nextui.dev
Home
Docs
Saved
Pricing
Components37
  • Forms & inputs7
  • Cards13
  • Buttons, badges & avatars8
  • Feedback & display6
  • Effects3
Agents17
  • Chat inputNew
  • Task checklistNew
  • ReasoningNew
  • Tool callNew
  • Tool approvalNew
  • SourcesNew
  • Agent timelineNew
  • Artifact panelNew
  • Streaming messageNew
  • Conversation shellNew
  • Voice agentNew
  • Voice orbNew
  • Thinking ring
  • Thinking waveNew
  • Thinking sparkle
  • Thinking bot
  • Prompt deckNew
Blocks20
  • Agent chatNew
  • Pill heroNew
  • Grid hero
  • Moodboard generatorNew
  • Waitlist heroNew
  • Intro bannerNew
  • Creative home heroNew
  • Chat heroNew
  • App shelfNew
  • Usage card
  • Design resultsNew
  • Pricing tiers
  • Dashboard home
  • The shiftNew
  • Launch perksNew
  • Testimonials
  • Quote
  • Team
  • Leads tableNew
  • Sign in
Pages10
  • ASCII workspace$49
  • CRM overviewNew
  • Marketing dashboardNew
  • Developer portfolio$49
  • Particle landing$49
  • Particle story$49
  • Statement converter$49
  • AI photo studio$49
  • Group card launch$49
  • Month-end storyNew
Themes9
  • Default
  • Ember
  • Ocean
  • Forest
  • Grape
  • Rose
  • Amber
  • Clay
  • Brutal
Upgrade
nextui.dev

nextui components, blocks and themes you install with one command.

Product

  • Components
  • Blocks
  • Themes
  • Pricing

Resources

  • Docs
  • Roadmap
  • GitHub

Legal

  • License
  • Privacy
  • Terms
  • Refunds

nextUI

[ 200 OK ] · nextUI

© 2026 NEXTUI • All rights reserved.

Upgrade
ComponentsForms & inputsPassword input
Copy promptCopy prompt

Customize

Text of the label above the field

Placeholder text

JSX · copied with Copy prompt

<PasswordStrengthInput />

Password input

Password input with show/hide toggle and a live strength checklist.

Installation

Set your access key from API keys as NEXTUI_TOKEN in .env.local and add the @nextui namespace below to components.json once. Then every item installs by name. Each install counts as a copy on a free account.

$pnpm dlx shadcn@latest add @nextui/password-input
1{
2 "registries": {
3 "@nextui": {
4 "url": "https://nextui.dev/r/{name}.json",
5 "headers": { "Authorization": "Bearer ${NEXTUI_TOKEN}" }
6 }
7 }
8}

Usage

1"use client";
2
3import { useState } from "react";
4import { PasswordStrengthInput, type PasswordRule } from "@/components/nextui/password-input";
5
6const rules: PasswordRule[] = [
7 { label: "12+ characters", test: (v) => v.length >= 12 },
8 { label: "A number", test: (v) => /\d/.test(v) },
9 { label: "A symbol", test: (v) => /[^A-Za-z0-9]/.test(v) },
10];
11
12export function SignupPassword() {
13 const [password, setPassword] = useState("");
14 const [strong, setStrong] = useState(false);
15
16 return (
17 <PasswordStrengthInput
18 label="Choose a password"
19 name="password"
20 rules={rules}
21 value={password}
22 onChange={(value, score) => {
23 setPassword(value);
24 setStrong(score === rules.length);
25 }}
26 />
27 );
28}

API reference

Edit props live in the preview above, or see all 9 props
PropTypeDefaultDescription
labelReactNode"Password"Text of the label above the field
placeholderstring"Create a password"Placeholder text
idstring"password-03"Field id, linked to the label
namestring–Field name for form submits
rulesPasswordRule[]8+ chars, number, uppercase, symbolRequirements shown as meter segments and a checklist
valuestring–Controlled value
defaultValuestring""Starting value when uncontrolled
onChange(value: string, score: number) => void–Called with the new value and how many rules it passes
classNamestring–Extra classes on the wrapper

Related

All components

Labeled input

Subscribe input

Settings list

Sign in to see the code

Preview it freely. A free account copies code and prompts a few times a day.

Sign in