We are excited to announceCoreUI PRO for React v5.23.0 — a feature-rich release that introduces the brand newCOneTimePassword component, enhanced autocomplete functionality, comprehensive documentation improvements, and significant dependency updates for better performance and security.
To update your project toCoreUI PRO for React v5.23.0, follow these steps:
package.json
.@coreui/react-pro
to5.23.0
@coreui/coreui-pro
to5.21.0
npm install
yarn install
Introducing the brand newCOneTimePassword component for secure authentication workflows:
// Basic OTP implementation<COneTimePasswordlength={6}onComplete={(value)=>console.log('OTP entered:',value)}/>// Advanced configuration<COneTimePasswordlength={4}variant="numeric"size="lg"separator="-"placeholder="•"autoFocusinvalid={hasError}feedback="Invalid code. Please try again."onComplete={handleOTPSubmission}onChange={handleOTPChange}/>// Custom styling with different formats<COneTimePasswordlength={8}variant="alphanumeric"className="custom-otp"style={{gap:'12px'}}/>
Variant Support:
numeric
- Numbers only (0-9)alphanumeric
- Letters and numbersalpha
- Letters onlycustom
- Custom character patternSize Variants:sm
,lg
, and default sizing
Visual Customization: Separators, placeholders, and custom styling
Event Handling:onChange
,onComplete
,onFocus
,onBlur
Validation States: Invalid state with custom feedback messages
Accessibility Features:
indicator
prop is explicitly set totrue
// Indicator only shows when explicitly enabled<CAutocompleteindicator={true}//Nowrequiredtoshowindicatoroptions={options}/>// No indicator rendered<CAutocompleteoptions={options}//indicatorpropomittedorfalse/>
This release includes significant dependency updates for enhanced performance, security, and compatibility:
@coreui/coreui-pro
from^5.20.0
to^5.21.0
@docsearch/css
from^4.0.1
to^4.1.0
@docsearch/react
from^4.0.1
to^4.1.0
@testing-library/jest-dom
from^6.8.0
to^6.9.1
@types/react
from^19.1.13
to^19.2.0
@types/react-dom
from^19.1.9
to^19.2.0
@typescript-eslint/parser
from^8.44.0
to^8.45.0
cross-env
from^10.0.0
to^10.1.0
eslint
from^9.35.0
to^9.36.0
eslint-plugin-react-hooks
from^5.2.0
to^6.1.0
globby
from^14.1.0
to^15.0.0
lerna
from^8.2.4
to^9.0.0
(Major update)rollup
from^4.50.2
to^4.52.3
sass
from^1.92.1
to^1.93.2
ts-jest
from^29.4.2
to^29.4.4
typescript
from^5.9.2
to^5.9.3
typescript-eslint
from^8.44.0
to^8.45.0
The new OTP component provides enterprise-grade security features:
Perfect for various authentication scenarios:
Enhanced development experience with:
The COneTimePassword component is ready to use immediately:
import{COneTimePassword}from'@coreui/react-pro'// Basic implementationfunctionLoginForm(){const[otp,setOtp]=useState('')return(<COneTimePasswordlength={6}onComplete={(value)=>{setOtp(value)// Handle OTP submission}}/>)}// Advanced implementation with validationfunctionSecureOTPForm(){const[otp,setOtp]=useState('')const[isValid,setIsValid]=useState(true)return(<COneTimePasswordlength={4}variant="numeric"size="lg"invalid={!isValid}feedback={!isValid?"Invalid code. Please try again.":""}onComplete={async(value)=>{try{awaitverifyOTP(value)setIsValid(true)}catch(error){setIsValid(false)}}}/>)}
For existing CAutocomplete implementations:
// Before v5.23.0 - indicator always rendered<CAutocompleteoptions={options}/>// After v5.23.0 - explicit indicator control<CAutocompleteoptions={options}indicator={true}//Addthistoshowindicator/>
All changes are backward compatible except for the CAutocomplete indicator behavior, which is a visual improvement that may require explicit indicator enabling if you were relying on the always-visible indicator.
The component is built with:
The OTP component includes several security best practices:
Comprehensive accessibility support includes:
Upgrade to CoreUI PRO for React v5.23.0 today to access the powerful new COneTimePassword component and enhanced autocomplete functionality. This release demonstrates our commitment to providing secure, accessible, and developer-friendly UI components.
For detailed documentation and implementation examples, visit: