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) => voidCallback изменения
disabledbooleanОтключено ли поле
placeholderstringPlaceholder text