233 lines
29 KiB
Plaintext
233 lines
29 KiB
Plaintext
// Generated by scripts/generate-showcase.mjs. Do not edit directly.
|
|
page StrongPasswordDetail {
|
|
layout = "showcase"
|
|
state playground_size = ctx.url.searchParams.get("pg_size") ?? "default"
|
|
state playground_color = ctx.url.searchParams.get("pg_color") ?? "primary"
|
|
state playground_label = ctx.url.searchParams.get("pg_label") ?? "Live strength meter"
|
|
state playground_name = ctx.url.searchParams.get("pg_name") ?? "strong-password-1"
|
|
state playground_value = ctx.url.searchParams.get("pg_value") ?? "Northstar!2026"
|
|
state playground_placeholder = ctx.url.searchParams.get("pg_placeholder") ?? "Create a strong password"
|
|
state playground_autocomplete = ctx.url.searchParams.get("pg_autocomplete") ?? "new-password"
|
|
state playground_minLength = Number(ctx.url.searchParams.get("pg_minLength") ?? "8")
|
|
state playground_specialCharactersSet = ctx.url.searchParams.get("pg_specialCharactersSet") ?? "!@#$%^&*()_+-=[]{}|;:,.<>?"
|
|
state playground_requireLowercase = (ctx.url.searchParams.get("pg_requireLowercase") ?? "true") === "true"
|
|
state playground_requireUppercase = (ctx.url.searchParams.get("pg_requireUppercase") ?? "true") === "true"
|
|
state playground_requireNumber = (ctx.url.searchParams.get("pg_requireNumber") ?? "true") === "true"
|
|
state playground_requireSpecialCharacter = (ctx.url.searchParams.get("pg_requireSpecialCharacter") ?? "true") === "true"
|
|
state playground_showRequirements = (ctx.url.searchParams.get("pg_showRequirements") ?? "false") === "true"
|
|
state playground_presentation = ctx.url.searchParams.get("pg_presentation") ?? "inline"
|
|
state playground_hintText = ctx.url.searchParams.get("pg_hintText") ?? ""
|
|
state playground_emptyLabel = ctx.url.searchParams.get("pg_emptyLabel") ?? "Enter a password"
|
|
state playground_weakLabel = ctx.url.searchParams.get("pg_weakLabel") ?? "Weak"
|
|
state playground_fairLabel = ctx.url.searchParams.get("pg_fairLabel") ?? "Fair"
|
|
state playground_goodLabel = ctx.url.searchParams.get("pg_goodLabel") ?? "Good"
|
|
state playground_strongLabel = ctx.url.searchParams.get("pg_strongLabel") ?? "Strong"
|
|
state playground_disabled = (ctx.url.searchParams.get("pg_disabled") ?? "false") === "true"
|
|
state playground_readonly = (ctx.url.searchParams.get("pg_readonly") ?? "false") === "true"
|
|
state playground_required = (ctx.url.searchParams.get("pg_required") ?? "false") === "true"
|
|
state playground_invalid = (ctx.url.searchParams.get("pg_invalid") ?? "false") === "true"
|
|
state playground_validationMessage = ctx.url.searchParams.get("pg_validationMessage") ?? ""
|
|
state playground_class = ctx.url.searchParams.get("pg_class") ?? ""
|
|
seo {
|
|
title = "Strong Password"
|
|
description = "Theme-aware, responsive strong password component."
|
|
}
|
|
view {
|
|
<nav class="docs-breadcrumbs" aria-label="Breadcrumb">
|
|
<a href="/">Components</a><span aria-hidden="true">/</span><a href="/advanced-forms">Advanced Forms</a><span aria-hidden="true">/</span><span>Strong Password</span>
|
|
</nav>
|
|
<header class="detail-hero">
|
|
<div class="detail-hero-copy">
|
|
<span class="showcase-eyebrow">Advanced Forms component</span>
|
|
<h1>Strong Password</h1>
|
|
<p>Theme-aware, responsive strong password component.</p>
|
|
<div class="detail-badges"><span>27 props</span><span>0 slots</span><span>3 outputs</span><span>Theme ready</span><span>Responsive</span></div>
|
|
</div>
|
|
<div class="detail-hero-icon"><span class="icon-[lucide--component] size-10" aria-hidden="true"></span></div>
|
|
</header>
|
|
<section id="playground" class="detail-section playground-section" data-playground data-playground-component="StrongPassword" data-playground-public-tag="true" data-playground-has-slot="false" data-playground-events="input,change,strength">
|
|
<div class="detail-section-heading"><span>Interactive playground</span><h2>Configure Strong Password</h2><p>Change any prop and inspect the server-rendered component immediately.</p></div>
|
|
<div class="playground-workbench">
|
|
<div class="playground-preview">
|
|
<div class="demo-browser-chrome"><span></span><span></span><span></span><small>Live preview</small></div>
|
|
<div class="playground-preview-source" data-playground-preview><StrongPassword size='{playground_size}' color='{playground_color}' label='{playground_label}' name='{playground_name}' value='{playground_value}' placeholder='{playground_placeholder}' autocomplete='{playground_autocomplete}' minLength='{playground_minLength}' specialCharactersSet='{playground_specialCharactersSet}' requireLowercase='{playground_requireLowercase}' requireUppercase='{playground_requireUppercase}' requireNumber='{playground_requireNumber}' requireSpecialCharacter='{playground_requireSpecialCharacter}' showRequirements='{playground_showRequirements}' presentation='{playground_presentation}' hintText='{playground_hintText}' emptyLabel='{playground_emptyLabel}' weakLabel='{playground_weakLabel}' fairLabel='{playground_fairLabel}' goodLabel='{playground_goodLabel}' strongLabel='{playground_strongLabel}' disabled='{playground_disabled}' readonly='{playground_readonly}' required='{playground_required}' invalid='{playground_invalid}' validationMessage='{playground_validationMessage}' class='{playground_class}' /></div>
|
|
<section class="playground-code" aria-label="Current component code">
|
|
<header><span><span class="icon-[lucide--code-2] size-4" aria-hidden="true"></span>Component code</span><button type="button" data-playground-copy><span class="icon-[lucide--copy] size-4" aria-hidden="true"></span>Copy</button></header>
|
|
<pre><code data-playground-code><StrongPassword
|
|
label="Live strength meter"
|
|
name="strong-password-1"
|
|
value="Northstar!2026"
|
|
showRequirements="false"
|
|
/></code></pre>
|
|
</section>
|
|
<div class="playground-status" data-playground-status aria-live="polite"></div>
|
|
<div class="playground-event-log" data-playground-event-log aria-live="polite"><strong>Event output</strong><span>Interact with the preview to inspect the typed <code>payload</code>.</span></div>
|
|
</div>
|
|
<form class="playground-controls" data-playground-form>
|
|
<header><div><span>Component props</span><strong>27 controls</strong></div><button type="reset"><span class="icon-[lucide--rotate-ccw] size-4" aria-hidden="true"></span>Reset</button></header>
|
|
<div class="playground-fields"><label class="playground-field" for="playground-strong-password-size"><span><strong>size</strong><small>string</small></span><select id="playground-strong-password-size" name="pg_size"><option value="default" selected>default</option><option value="xs">xs</option><option value="sm">sm</option><option value="md">md</option><option value="lg">lg</option><option value="xl">xl</option><option value="icon">icon</option><option value="icon-xs">icon-xs</option><option value="icon-sm">icon-sm</option><option value="icon-lg">icon-lg</option></select></label><label class="playground-field" for="playground-strong-password-color"><span><strong>color</strong><small>string</small></span><select id="playground-strong-password-color" name="pg_color"><option value="primary" selected>primary</option><option value="secondary">secondary</option><option value="success">success</option><option value="warning">warning</option><option value="danger">danger</option><option value="info">info</option></select></label><label class="playground-field" for="playground-strong-password-label"><span><strong>label</strong><small>string</small></span><input id="playground-strong-password-label" name="pg_label" type="text" value="Live strength meter" /></label><label class="playground-field" for="playground-strong-password-name"><span><strong>name</strong><small>string</small></span><input id="playground-strong-password-name" name="pg_name" type="text" value="strong-password-1" /></label><label class="playground-field" for="playground-strong-password-value"><span><strong>value</strong><small>string</small></span><input id="playground-strong-password-value" name="pg_value" type="text" value="Northstar!2026" /></label><label class="playground-field" for="playground-strong-password-placeholder"><span><strong>placeholder</strong><small>string</small></span><input id="playground-strong-password-placeholder" name="pg_placeholder" type="text" value="Create a strong password" /></label><label class="playground-field" for="playground-strong-password-autocomplete"><span><strong>autocomplete</strong><small>string</small></span><input id="playground-strong-password-autocomplete" name="pg_autocomplete" type="text" value="new-password" /></label><label class="playground-field" for="playground-strong-password-minLength"><span><strong>min Length</strong><small>number</small></span><input id="playground-strong-password-minLength" name="pg_minLength" type="number" value="8" /></label><label class="playground-field" for="playground-strong-password-specialCharactersSet"><span><strong>special Characters Set</strong><small>string</small></span><input id="playground-strong-password-specialCharactersSet" name="pg_specialCharactersSet" type="text" value="!@#$%^&*()_+-=[]{}|;:,.<>?" /></label><label class="playground-toggle" for="playground-strong-password-requireLowercase"><span><strong>require Lowercase</strong><small>boolean</small></span><input id="playground-strong-password-requireLowercase" name="pg_requireLowercase" type="checkbox" value="true" checked data-playground-boolean /><i aria-hidden="true"></i></label><label class="playground-toggle" for="playground-strong-password-requireUppercase"><span><strong>require Uppercase</strong><small>boolean</small></span><input id="playground-strong-password-requireUppercase" name="pg_requireUppercase" type="checkbox" value="true" checked data-playground-boolean /><i aria-hidden="true"></i></label><label class="playground-toggle" for="playground-strong-password-requireNumber"><span><strong>require Number</strong><small>boolean</small></span><input id="playground-strong-password-requireNumber" name="pg_requireNumber" type="checkbox" value="true" checked data-playground-boolean /><i aria-hidden="true"></i></label><label class="playground-toggle" for="playground-strong-password-requireSpecialCharacter"><span><strong>require Special Character</strong><small>boolean</small></span><input id="playground-strong-password-requireSpecialCharacter" name="pg_requireSpecialCharacter" type="checkbox" value="true" checked data-playground-boolean /><i aria-hidden="true"></i></label><label class="playground-toggle" for="playground-strong-password-showRequirements"><span><strong>show Requirements</strong><small>boolean</small></span><input id="playground-strong-password-showRequirements" name="pg_showRequirements" type="checkbox" value="true" data-playground-boolean /><i aria-hidden="true"></i></label><label class="playground-field" for="playground-strong-password-presentation"><span><strong>presentation</strong><small>string</small></span><input id="playground-strong-password-presentation" name="pg_presentation" type="text" value="inline" /></label><label class="playground-field" for="playground-strong-password-hintText"><span><strong>hint Text</strong><small>string</small></span><input id="playground-strong-password-hintText" name="pg_hintText" type="text" value="" /></label><label class="playground-field" for="playground-strong-password-emptyLabel"><span><strong>empty Label</strong><small>string</small></span><input id="playground-strong-password-emptyLabel" name="pg_emptyLabel" type="text" value="Enter a password" /></label><label class="playground-field" for="playground-strong-password-weakLabel"><span><strong>weak Label</strong><small>string</small></span><input id="playground-strong-password-weakLabel" name="pg_weakLabel" type="text" value="Weak" /></label><label class="playground-field" for="playground-strong-password-fairLabel"><span><strong>fair Label</strong><small>string</small></span><input id="playground-strong-password-fairLabel" name="pg_fairLabel" type="text" value="Fair" /></label><label class="playground-field" for="playground-strong-password-goodLabel"><span><strong>good Label</strong><small>string</small></span><input id="playground-strong-password-goodLabel" name="pg_goodLabel" type="text" value="Good" /></label><label class="playground-field" for="playground-strong-password-strongLabel"><span><strong>strong Label</strong><small>string</small></span><input id="playground-strong-password-strongLabel" name="pg_strongLabel" type="text" value="Strong" /></label><label class="playground-toggle" for="playground-strong-password-disabled"><span><strong>disabled</strong><small>boolean</small></span><input id="playground-strong-password-disabled" name="pg_disabled" type="checkbox" value="true" data-playground-boolean /><i aria-hidden="true"></i></label><label class="playground-toggle" for="playground-strong-password-readonly"><span><strong>readonly</strong><small>boolean</small></span><input id="playground-strong-password-readonly" name="pg_readonly" type="checkbox" value="true" data-playground-boolean /><i aria-hidden="true"></i></label><label class="playground-toggle" for="playground-strong-password-required"><span><strong>required</strong><small>boolean</small></span><input id="playground-strong-password-required" name="pg_required" type="checkbox" value="true" data-playground-boolean /><i aria-hidden="true"></i></label><label class="playground-toggle" for="playground-strong-password-invalid"><span><strong>invalid</strong><small>boolean</small></span><input id="playground-strong-password-invalid" name="pg_invalid" type="checkbox" value="true" data-playground-boolean /><i aria-hidden="true"></i></label><label class="playground-field" for="playground-strong-password-validationMessage"><span><strong>validation Message</strong><small>string</small></span><input id="playground-strong-password-validationMessage" name="pg_validationMessage" type="text" value="" /></label><label class="playground-field" for="playground-strong-password-class"><span><strong>class</strong><small>string</small></span><input id="playground-strong-password-class" name="pg_class" type="text" value="" /></label></div>
|
|
</form>
|
|
</div>
|
|
</section>
|
|
<div class="detail-layout">
|
|
<main class="detail-content">
|
|
<section class="detail-section"><div class="detail-section-heading"><span>Live examples</span><h2>Designed for real product surfaces</h2><p>Compare configurations and resize the browser to check responsive behavior.</p></div><div class="demo-list">
|
|
<article class="demo-case">
|
|
<header class="demo-case-header">
|
|
<div><span class="demo-case-eyebrow">Strength feedback</span><h2>Live strength meter</h2><p>Live live strength meter example with accessible scoring feedback and copyable component code.</p></div>
|
|
<span class="demo-case-number">01</span>
|
|
</header>
|
|
<div class="demo-workbench">
|
|
<div id="strong-password-demo-1" class="demo-canvas demo-canvas--1">
|
|
<div class="demo-browser-chrome"><span></span><span></span><span></span><small>Live preview</small></div>
|
|
|
|
<div class="demo-render"><StrongPassword label="Live strength meter" name="strong-password-1" value="Northstar!2026" placeholder="Create a strong password" autocomplete="new-password" minLength="8" specialCharactersSet="!@#$%^&*()_+-=[]{}|;:,.<>?" requireLowercase="true" requireUppercase="true" requireNumber="true" requireSpecialCharacter="true" showRequirements="false" presentation="inline" hintText="" disabled="false" readonly="false" required="false" invalid="false" validationMessage="" /></div>
|
|
</div>
|
|
<section class="demo-code" aria-label="Live strength meter usage">
|
|
<header><span><span class="icon-[lucide--code-2] size-4" aria-hidden="true"></span>Component usage</span><small>.wrn</small></header>
|
|
<pre><code><StrongPassword
|
|
label="Live strength meter"
|
|
name="strong-password-1"
|
|
value="Northstar!2026"
|
|
showRequirements="false"
|
|
/></code></pre>
|
|
</section>
|
|
</div>
|
|
</article>
|
|
<article class="demo-case">
|
|
<header class="demo-case-header">
|
|
<div><span class="demo-case-eyebrow">Strength feedback</span><h2>Requirements and hint text</h2><p>Live requirements and hint text example with accessible scoring feedback and copyable component code.</p></div>
|
|
<span class="demo-case-number">02</span>
|
|
</header>
|
|
<div class="demo-workbench">
|
|
<div id="strong-password-demo-2" class="demo-canvas demo-canvas--2">
|
|
<div class="demo-browser-chrome"><span></span><span></span><span></span><small>Live preview</small></div>
|
|
|
|
<div class="demo-render"><StrongPassword label="Requirements and hint text" name="strong-password-2" value="" placeholder="Create a strong password" autocomplete="new-password" minLength="8" specialCharactersSet="!@#$%^&*()_+-=[]{}|;:,.<>?" requireLowercase="true" requireUppercase="true" requireNumber="true" requireSpecialCharacter="true" showRequirements="true" presentation="inline" hintText="Use a unique password you do not use for another account." disabled="false" readonly="false" required="false" invalid="false" validationMessage="" /></div>
|
|
</div>
|
|
<section class="demo-code" aria-label="Requirements and hint text usage">
|
|
<header><span><span class="icon-[lucide--code-2] size-4" aria-hidden="true"></span>Component usage</span><small>.wrn</small></header>
|
|
<pre><code><StrongPassword
|
|
label="Requirements and hint text"
|
|
name="strong-password-2"
|
|
hintText="Use a unique password you do not use for another account."
|
|
/></code></pre>
|
|
</section>
|
|
</div>
|
|
</article>
|
|
<article class="demo-case">
|
|
<header class="demo-case-header">
|
|
<div><span class="demo-case-eyebrow">Strength feedback</span><h2>Requirements in a popover</h2><p>Live requirements in a popover example with accessible scoring feedback and copyable component code.</p></div>
|
|
<span class="demo-case-number">03</span>
|
|
</header>
|
|
<div class="demo-workbench">
|
|
<div id="strong-password-demo-3" class="demo-canvas demo-canvas--3">
|
|
<div class="demo-browser-chrome"><span></span><span></span><span></span><small>Live preview</small></div>
|
|
|
|
<div class="demo-render"><StrongPassword label="Requirements in a popover" name="strong-password-3" value="" placeholder="Create a strong password" autocomplete="new-password" minLength="8" specialCharactersSet="!@#$%^&*()_+-=[]{}|;:,.<>?" requireLowercase="true" requireUppercase="true" requireNumber="true" requireSpecialCharacter="true" showRequirements="true" presentation="popover" hintText="" disabled="false" readonly="false" required="false" invalid="false" validationMessage="" /></div>
|
|
</div>
|
|
<section class="demo-code" aria-label="Requirements in a popover usage">
|
|
<header><span><span class="icon-[lucide--code-2] size-4" aria-hidden="true"></span>Component usage</span><small>.wrn</small></header>
|
|
<pre><code><StrongPassword
|
|
label="Requirements in a popover"
|
|
name="strong-password-3"
|
|
presentation="popover"
|
|
/></code></pre>
|
|
</section>
|
|
</div>
|
|
</article>
|
|
<article class="demo-case">
|
|
<header class="demo-case-header">
|
|
<div><span class="demo-case-eyebrow">Configuration</span><h2>Custom special characters</h2><p>Live custom special characters example with accessible scoring feedback and copyable component code.</p></div>
|
|
<span class="demo-case-number">04</span>
|
|
</header>
|
|
<div class="demo-workbench">
|
|
<div id="strong-password-demo-4" class="demo-canvas demo-canvas--4">
|
|
<div class="demo-browser-chrome"><span></span><span></span><span></span><small>Live preview</small></div>
|
|
|
|
<div class="demo-render"><StrongPassword label="Custom special characters" name="strong-password-4" value="" placeholder="Create a strong password" autocomplete="new-password" minLength="8" specialCharactersSet="@#_-." requireLowercase="true" requireUppercase="true" requireNumber="true" requireSpecialCharacter="true" showRequirements="true" presentation="inline" hintText="" disabled="false" readonly="false" required="false" invalid="false" validationMessage="" /></div>
|
|
</div>
|
|
<section class="demo-code" aria-label="Custom special characters usage">
|
|
<header><span><span class="icon-[lucide--code-2] size-4" aria-hidden="true"></span>Component usage</span><small>.wrn</small></header>
|
|
<pre><code><StrongPassword
|
|
label="Custom special characters"
|
|
name="strong-password-4"
|
|
specialCharactersSet="@#_-."
|
|
/></code></pre>
|
|
</section>
|
|
</div>
|
|
</article>
|
|
<article class="demo-case">
|
|
<header class="demo-case-header">
|
|
<div><span class="demo-case-eyebrow">Configuration</span><h2>Optional requirements</h2><p>Live optional requirements example with accessible scoring feedback and copyable component code.</p></div>
|
|
<span class="demo-case-number">05</span>
|
|
</header>
|
|
<div class="demo-workbench">
|
|
<div id="strong-password-demo-5" class="demo-canvas demo-canvas--5">
|
|
<div class="demo-browser-chrome"><span></span><span></span><span></span><small>Live preview</small></div>
|
|
|
|
<div class="demo-render"><StrongPassword label="Optional requirements" name="strong-password-5" value="" placeholder="Create a strong password" autocomplete="new-password" minLength="8" specialCharactersSet="!@#$%^&*()_+-=[]{}|;:,.<>?" requireLowercase="true" requireUppercase="true" requireNumber="true" requireSpecialCharacter="false" showRequirements="true" presentation="inline" hintText="" disabled="false" readonly="false" required="false" invalid="false" validationMessage="" /></div>
|
|
</div>
|
|
<section class="demo-code" aria-label="Optional requirements usage">
|
|
<header><span><span class="icon-[lucide--code-2] size-4" aria-hidden="true"></span>Component usage</span><small>.wrn</small></header>
|
|
<pre><code><StrongPassword
|
|
label="Optional requirements"
|
|
name="strong-password-5"
|
|
requireSpecialCharacter="false"
|
|
/></code></pre>
|
|
</section>
|
|
</div>
|
|
</article>
|
|
<article class="demo-case">
|
|
<header class="demo-case-header">
|
|
<div><span class="demo-case-eyebrow">Configuration</span><h2>Disabled password strength</h2><p>Live disabled password strength example with accessible scoring feedback and copyable component code.</p></div>
|
|
<span class="demo-case-number">06</span>
|
|
</header>
|
|
<div class="demo-workbench">
|
|
<div id="strong-password-demo-6" class="demo-canvas demo-canvas--6">
|
|
<div class="demo-browser-chrome"><span></span><span></span><span></span><small>Live preview</small></div>
|
|
|
|
<div class="demo-render"><StrongPassword label="Disabled password strength" name="strong-password-6" value="" placeholder="Create a strong password" autocomplete="new-password" minLength="8" specialCharactersSet="!@#$%^&*()_+-=[]{}|;:,.<>?" requireLowercase="true" requireUppercase="true" requireNumber="true" requireSpecialCharacter="true" showRequirements="true" presentation="inline" hintText="" disabled="true" readonly="false" required="false" invalid="false" validationMessage="" /></div>
|
|
</div>
|
|
<section class="demo-code" aria-label="Disabled password strength usage">
|
|
<header><span><span class="icon-[lucide--code-2] size-4" aria-hidden="true"></span>Component usage</span><small>.wrn</small></header>
|
|
<pre><code><StrongPassword
|
|
label="Disabled password strength"
|
|
name="strong-password-6"
|
|
disabled="true"
|
|
/></code></pre>
|
|
</section>
|
|
</div>
|
|
</article></div></section>
|
|
<section id="events" class="detail-section"><div class="detail-section-heading"><span>Component outputs</span><h2>Receive every typed component output</h2><p>Use declarative output handlers in <code>.wrn</code> files or register a direct output handler from JavaScript. The canonical API exposes <code>payload</code> and does not require <code>event.detail</code>.</p></div><div class="detail-events-grid"><div class="detail-events-list"><div><code>@input</code><span>Fires as the editable value changes.</span></div><div><code>@change</code><span>Fires when the component's committed value or selection changes.</span></div><div><code>@strength</code><span>Fires when the calculated password-strength state changes.</span></div></div><div class="detail-event-examples"><section class="demo-code"><header><span><span class="icon-[lucide--braces] size-4" aria-hidden="true"></span>Declarative handlers</span><small>.wrn</small></header><pre><code><StrongPassword
|
|
@input='console.log(payload)'
|
|
@change='console.log(payload)'
|
|
@strength='console.log(payload)'
|
|
/></code></pre></section><section class="demo-code"><header><span><span class="icon-[lucide--radio] size-4" aria-hidden="true"></span>Direct output handlers</span><small>.js</small></header><pre><code>import <span>{</span> registerOutputHandler <span>}</span> from "@wrnexus/csr/outputs"
|
|
|
|
const component = document.querySelector("[data-ui-component=\"StrongPassword\"], [data-component=\"StrongPassword\"]")
|
|
|
|
if (component) registerOutputHandler(component, "input", (payload) => <span>{</span>
|
|
console.log("input", payload)
|
|
<span>}</span>)
|
|
|
|
if (component) registerOutputHandler(component, "change", (payload) => <span>{</span>
|
|
console.log("change", payload)
|
|
<span>}</span>)
|
|
|
|
if (component) registerOutputHandler(component, "strength", (payload) => <span>{</span>
|
|
console.log("strength", payload)
|
|
<span>}</span>)</code></pre></section></div></div></section>
|
|
<section id="api" class="detail-section"><div class="detail-section-heading"><span>Component API</span><h2>Props and configuration</h2><p>All content and behavior shown above is supplied through these props and slots.</p></div><div class="docs-table-wrap"><table class="docs-table"><thead><tr><th>Prop</th><th>Type</th><th>Default</th><th>Required</th></tr></thead><tbody><tr><td><code>size</code></td><td>string</td><td><code>"default"</code></td><td>No</td></tr><tr><td><code>color</code></td><td>string</td><td><code>"primary"</code></td><td>No</td></tr><tr><td><code>label</code></td><td>string</td><td><code>"Password"</code></td><td>No</td></tr><tr><td><code>name</code></td><td>string</td><td><code>"password"</code></td><td>No</td></tr><tr><td><code>value</code></td><td>string</td><td><code>""</code></td><td>No</td></tr><tr><td><code>placeholder</code></td><td>string</td><td><code>"Create a strong password"</code></td><td>No</td></tr><tr><td><code>autocomplete</code></td><td>string</td><td><code>"new-password"</code></td><td>No</td></tr><tr><td><code>minLength</code></td><td>number</td><td><code>8</code></td><td>No</td></tr><tr><td><code>specialCharactersSet</code></td><td>string</td><td><code>"!@#$%^&*()_+-=[]<span>{</span><span>}</span>|;:,.<>?"</code></td><td>No</td></tr><tr><td><code>requireLowercase</code></td><td>boolean</td><td><code>true</code></td><td>No</td></tr><tr><td><code>requireUppercase</code></td><td>boolean</td><td><code>true</code></td><td>No</td></tr><tr><td><code>requireNumber</code></td><td>boolean</td><td><code>true</code></td><td>No</td></tr><tr><td><code>requireSpecialCharacter</code></td><td>boolean</td><td><code>true</code></td><td>No</td></tr><tr><td><code>showRequirements</code></td><td>boolean</td><td><code>true</code></td><td>No</td></tr><tr><td><code>presentation</code></td><td>string</td><td><code>"inline"</code></td><td>No</td></tr><tr><td><code>hintText</code></td><td>string</td><td><code>"Use a unique password you do not use elsewhere."</code></td><td>No</td></tr><tr><td><code>emptyLabel</code></td><td>string</td><td><code>"Enter a password"</code></td><td>No</td></tr><tr><td><code>weakLabel</code></td><td>string</td><td><code>"Weak"</code></td><td>No</td></tr><tr><td><code>fairLabel</code></td><td>string</td><td><code>"Fair"</code></td><td>No</td></tr><tr><td><code>goodLabel</code></td><td>string</td><td><code>"Good"</code></td><td>No</td></tr><tr><td><code>strongLabel</code></td><td>string</td><td><code>"Strong"</code></td><td>No</td></tr><tr><td><code>disabled</code></td><td>boolean</td><td><code>false</code></td><td>No</td></tr><tr><td><code>readonly</code></td><td>boolean</td><td><code>false</code></td><td>No</td></tr><tr><td><code>required</code></td><td>boolean</td><td><code>false</code></td><td>No</td></tr><tr><td><code>invalid</code></td><td>boolean</td><td><code>false</code></td><td>No</td></tr><tr><td><code>validationMessage</code></td><td>string</td><td><code>""</code></td><td>No</td></tr><tr><td><code>class</code></td><td>string</td><td><code>""</code></td><td>No</td></tr></tbody></table></div></section>
|
|
</main>
|
|
<aside class="detail-aside">
|
|
<div class="detail-toc"><strong>On this page</strong><a href="#playground">Playground</a><a href="#strong-password-demo-1">Live strength meter</a><a href="#strong-password-demo-2">Requirements and hint text</a><a href="#strong-password-demo-3">Requirements in a popover</a><a href="#strong-password-demo-4">Custom special characters</a><a href="#strong-password-demo-5">Optional requirements</a><a href="#strong-password-demo-6">Disabled password strength</a><a href="#events">Outputs</a><a href="#api">Props API</a></div>
|
|
</aside>
|
|
</div>
|
|
<nav class="detail-pagination">
|
|
<a href="/components/pin-input"><small>Previous</small><strong>← Pin Input</strong></a>
|
|
<a href="/components/toggle-count"><small>Next</small><strong>Toggle Count →</strong></a>
|
|
</nav>
|
|
}
|
|
}
|