{"name":"@reach/auto-id","version":"0.7.1","description":"Autogenerate IDs to facilitate WAI-ARIA and server rendering.","repository":{"type":"git","url":"git+https://github.com/reach/reach-ui.git","directory":"packages/auto-id"},"main":"dist/index.js","umd:main":"dist/auto-id.umd.production.js","module":"dist/auto-id.esm.js","typings":"dist/index.d.ts","scripts":{"build":"cross-env NODE_ENV=production tsdx build --format=cjs,esm,umd"},"peerDependencies":{"react":"^16.8.0","react-dom":"^16.8.0"},"author":{"name":"React Training","email":"hello@reacttraining.com"},"license":"MIT","_id":"@reach/auto-id@0.7.1","dist":{"shasum":"68ff4345b12c5ead6d0374a574480090b18a1b31","integrity":"sha512-7bE/tCFc6KBMKkSfquJFpeZic+OHe+RAE2OHCN66felnleVwm6hr128d2UAp5vb1H12F6fm1kCUV9s3xNqSwMQ==","tarball":"http://registry-npm.ywwl.com/@reach/auto-id/download/@reach/auto-id-0.7.1.tgz","fileCount":16,"unpackedSize":40652,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeFlD7CRA9TVsSAnZWagAAQb0P/iI55SHzt2SolBN1lw0f\nNCAloA7nwZGztYcaUDlmeE2nVR3ICANzIsUbFKJyn5m8MwvMkkpMxfiNKse1\nvvforz2KXMVzEjg5/UXNcyt18Po9PvUTyTagvLDmJC9OTALZ7P4U6e8iPka+\n6znOL2jUiz0z344ZwDeHcU9XD9nL8CX+tFsFAZHxfaAh6qXfCsgDTqG7mWCm\ngl2+Pc6PnGl8SW6Xww9Z5sYDOz0W8GtHO/0HWuNeH4Mb7mNXADB3aWNSTbKr\no/3rsqYXiO7eItHY4ie8wfgSyieDSi3crN2W8JXU5J3F7g/vWjEhXzHnthSy\nh9ihaF4SOj0eVPQiT2nzuM0agoAFowFQurCLtJIt/Dg7RP6Jc1RFQ3rolkN+\nwph/fp7OixkLbNP4WaFHt7azrKws+Qeqf2l2UZ0YMhD3BtJQ6yKJdPm4rFAU\nMC0tK1wzcyr5Z3XiYNDDOwNo36OsC2zFeodjE9B6XJD9wv5eYVHVRL0yryIy\nPFJ2peWxgfKUrL9kYt6XwOORAqDAzkJW2cuqnj5q5YdUPvWmuvHEwRWNbSNe\nbwIE40QRt4zjbGm1ZmLI1y4t3vhVe0bMp2eoUdiq2JaOYr2dNMI9cObsJJ9l\nPGTX+4r/6eSnZyOf7D476bC0RF0idf84IJDO2vyxG8HskOzFlmdntlhQFrpl\nFUmm\r\n=Ycwp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDETZ1djhx4qTJA3S3ByN0PLKFSZYVywhVnGFu1dBXQ0QIgEG7NJfVLhM0ZMLuLH18fPYg6wm5AlWeQlrOmrh4c3Pw="}],"size":5346,"noattachment":false,"key":"/@reach/auto-id/-/@reach/auto-id-0.7.1.tgz"},"maintainers":[{"email":"chance.strickland@gmail.com","name":"chancestrickland"},{"email":"npm@mjackson.me","name":"mjackson"},{"email":"rpflorence@gmail.com","name":"ryanflorence"}],"_npmUser":{"name":"chancestrickland","email":"chance.strickland@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/auto-id_0.7.1_1578520826803_0.5857373895035036"},"_hasShrinkwrap":false,"readme":"# @reach/auto-id\n\n[![Stable release](https://img.shields.io/npm/v/@reach/auto-id.svg)](https://npm.im/@reach/auto-id) ![MIT license](https://badgen.now.sh/badge/license/MIT)\n\n[Docs](https://reach.tech/auto-id) | [Source](https://github.com/reach/reach-ui/tree/main/packages/auto-id)\n\nAutogenerate IDs to facilitate WAI-ARIA and server rendering.\n\nA string can be supplied as an argument to be `useId` in lieu of the auto-generated ID. This is handy for accepting user-provided prop IDs that need to be deterministic.\n\n```jsx\nimport { useId } from \"@reach/auto-id\";\n\nfunction FormField(props) {\n\tconst id = useId(props.id);\n\treturn (\n\t\t<React.Fragment>\n\t\t\t<label htmlFor={id}>{props.label}</label>\n\t\t\t<input type={props.type} name={props.name} id={id} />\n\t\t</React.Fragment>\n\t);\n}\n```\n","publish_time":1578520826926,"_cnpm_publish_time":1578520826926,"dist-tags":{"latest":"0.18.0","next":"0.4.0-beta.0","pre":"0.18.0-pre.5"}}