PasswordInput

PasswordInput は、強度表示付きでパスワードを入力するためのコンポーネントです。

基本的な使い方

The strength bar is only a visual hint.
import React, { useState } from 'react';
import { PasswordInput } from '@nocobase/client-v2';
import { Space, Typography } from 'antd';

export default function PasswordInputDemo() {
  const [value, setValue] = useState('');

  return (
    <Space direction="vertical" style={{ width: 320 }}>
      <PasswordInput
        value={value}
        checkStrength
        placeholder="Input password"
        onChange={(event) => setValue(event.target.value)}
      />
      <Typography.Text type="secondary">
        The strength bar is only a visual hint.
      </Typography.Text>
    </Space>
  );
}

API

パラメータ説明
valuestring現在の値
onChange(event) => void値変更時のコールバック
disabledboolean無効化するかどうか
placeholderstringプレースホルダー文字列