PasswordInput

PasswordInput dùng để nhập mật khẩu kèm chỉ báo độ mạnh.

Cách dùng cơ bản

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

Tham sốKiểuMô tả
valuestringGiá trị hiện tại
onChange(event) => voidCallback khi thay đổi
disabledbooleanCó bị vô hiệu hóa hay không
placeholderstringPlaceholder text