# Shadcn Strength Meter

> Advanced password strength indicator with progress

- Type: example, free and open source (MIT)
- Component: [Input](https://reui.io/components/input.md)
- Page: https://reui.io/components/input/c-input-23
- Docs (Base UI): https://ui.shadcn.com/docs/components/base/input.md
- Docs (Radix UI): https://ui.shadcn.com/docs/components/radix/input.md
- MCP: `get_example("c-input-23")`
- Registry item: https://reui.io/r/styles/base-nova/c-input-23.json
- Uses: Field, Input

## Best for

A 5 rule checklist with ticks, a 5 segment color bar, a met count and an eye toggle

## Agent notes

- The bar draws 5 segments and the count reads out of 5 by hand, so a rule added to `checkStrength` needs both updated
- The eye button's aria-controls names `password`, an id that does not exist; point it at the generated `id`

## When not to use

- A single hint line with no bar or rule checklist: use [Strength Hint](https://reui.io/components/input/c-input-22.md) (`get_example("c-input-22")`)

## Install

```bash
npx shadcn@latest add @reui/c-input-23
```

## About Shadcn Input

### When to use

- Labeled text, email and search fields, plain or restyled as a pill, an underline or borderless
- Native typed fields for passwords, phones, URLs, numbers, dates, times, files, colors and ranges
- Field states and hints: disabled, required or optional marks, errors, character counts and password strength

### When not to use

- Icons, buttons, units or a prefix that sit inside the border of the box: use [Input Group](https://reui.io/components/input-group.md) (`get_component("input-group")`)
- International numbers chosen by country flag and formatted as the user types: use [Phone Input](https://reui.io/components/phone-input.md) (`get_component("phone-input")`)
- A whole create or edit page that gathers many fields under one save action: use the [Form blocks](https://reui.io/blocks/application/form.md)

### Agent notes

- The red invalid border comes from `aria-invalid` on `Input` in every style; `FieldError` only prints the message

Every ReUI item has a twin like this one; the index is https://reui.io/llms.txt. Agents with the ReUI MCP (https://reui.io/docs/mcp) get the same guidance from the getters named above.
