@reach/auto-id
Autogenerate IDs to facilitate WAI-ARIA and server rendering.
Last updated 5 years ago by chancestrickland .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @reach/auto-id 
SYNC missed versions from official npm registry.

@reach/auto-id

Stable release MIT license

Docs | Source

Autogenerate IDs to facilitate WAI-ARIA and server rendering.

A 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.

import { useId } from "@reach/auto-id";

function FormField(props) {
	const id = useId(props.id);
	return (
		<React.Fragment>
			<label htmlFor={id}>{props.label}</label>
			<input type={props.type} name={props.name} id={id} />
		</React.Fragment>
	);
}

Current Tags

  • 0.16.0                                ...           latest (5 years ago)
  • 0.4.0-beta.0                                ...           next (6 years ago)

38 Versions

  • 0.16.0                                ...           5 years ago
  • 0.15.3                                ...           5 years ago
  • 0.15.2                                ...           5 years ago
  • 0.15.0                                ...           5 years ago
  • 0.14.0                                ...           5 years ago
  • 0.13.2                                ...           5 years ago
  • 0.13.1                                ...           5 years ago
  • 0.13.0                                ...           5 years ago
  • 0.12.1                                ...           5 years ago
  • 0.12.0                                ...           5 years ago
  • 0.11.2                                ...           6 years ago
  • 0.11.1                                ...           6 years ago
  • 0.11.0                                ...           6 years ago
  • 0.10.5                                ...           6 years ago
  • 0.10.4                                ...           6 years ago
  • 0.10.3                                ...           6 years ago
  • 0.10.2                                ...           6 years ago
  • 0.10.1                                ...           6 years ago
  • 0.10.0                                ...           6 years ago
  • 0.9.0                                ...           6 years ago
  • 0.8.6                                ...           6 years ago
  • 0.8.5                                ...           6 years ago
  • 0.8.2                                ...           6 years ago
  • 0.8.0                                ...           6 years ago
  • 0.7.4                                ...           6 years ago
  • 0.7.3                                ...           6 years ago
  • 0.7.2                                ...           6 years ago
  • 0.7.1                                ...           6 years ago
  • 0.7.0                                ...           6 years ago
  • 0.6.1                                ...           6 years ago
  • 0.5.3                                ...           6 years ago
  • 0.5.0                                ...           6 years ago
  • 0.4.0                                ...           6 years ago
  • 0.4.0-beta.0                                ...           6 years ago
  • 0.3.0                                ...           6 years ago
  • 0.3.0-alpha.0                                ...           7 years ago
  • 0.2.0                                ...           7 years ago
  • 0.1.0                                ...           7 years ago
Downloads
Today 0
This Week 1
This Month 1
Last Day 0
Last Week 0
Last Month 2
Dependencies (2)
Dev Dependencies (2)

Copyright 2013 - present © cnpmjs.org | Home |