Skip to content

Commit

Permalink
Add password input example
Browse files Browse the repository at this point in the history
  • Loading branch information
ahosgood committed Jan 14, 2025
1 parent 64f50fc commit a94b581
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/components/text-input/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,9 @@ group: components
## Inline

{{ example({ group: "components", item: "text-input", example: "inline", html: true, nunjucks: true, size: "xxs" }) }}

## Password

The password text input is enhanced with JavaScript to allow the hiding and showing of the password.

{{ example({ group: "components", item: "text-input", example: "password", html: true, nunjucks: true, size: "xs" }) }}
16 changes: 16 additions & 0 deletions src/components/text-input/password/index.njk
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
title: Text input - password
layout: examples/plain.njk
private: true
---

{% from "nationalarchives/components/text-input/macro.njk" import tnaTextInput %}

{{ tnaTextInput({
label: "Enter your password",
headingLevel: 4,
headingSize: "m",
id: "password",
name: "password",
password: true
}) }}

0 comments on commit a94b581

Please sign in to comment.