
Security News
Open Source Maintainers Feeling the Weight of the EU’s Cyber Resilience Act
The EU Cyber Resilience Act is prompting compliance requests that open source maintainers may not be obligated or equipped to handle.
hetlabs-textfields
Advanced tools
A versatile and customizable TextField component for React applications, built with MUI.
A versatile and customizable TextField component for React applications, built with MUI.
Install the package via npm:
npm install your-component
Or via yarn:
yarn add your-component
Here's a basic example of how to use the custom TextField component in your React application:
import React from "react";
import TextFields from "your-component";
const App = () => {
return (
<div>
<TextFields
required
label="Required"
placeholder="Hello World"
showError={true}
errorMessage="This field is required"
variant="outlined"
/>
</div>
);
};
export default App;
Prop | Type | Default | Description |
---|---|---|---|
className | String | CSS class for custom styling | |
placeholder | String | Placeholder text for the input | |
onChange | Function | Function to handle change events | |
type | String | text | Type of the input (text, password, etc.) |
errorMessage | String | Error message to display when showError is true | |
label | String | Label text for the input | |
showError | Boolean | false | Whether to show the error message |
showPasswordTooltip | Boolean | false | Whether to show password suggestions tooltip |
showBottomLabel | Boolean | false | Whether to show a bottom label with a link |
bottomLabelPath | String | URL path for the bottom label link | |
bottomLabelText | String | Text for the bottom label link | |
passwordSuggestions | Array | Array of password suggestion strings |
You can customize the TextField by passing additional props or overriding the default styles:
<TextFields
placeholder="Enter your password"
type="password"
showPasswordTooltip={true}
passwordSuggestions={[
"At least 8 characters",
"A mix of upper and lower case letters",
"At least one number",
"At least one special character",
]}
showError={true}
errorMessage="Password is required"
bottomLabelPath="/forgot-password"
bottomLabelText="Forgot Password?"
style={{ backgroundColor: '#f0f0f0' }}
/>
If you would like to contribute to the project, please follow these steps:
This project is licensed under the MIT License - see the LICENSE file for details.
If you have any questions or suggestions, feel free to open an issue or contact me directly at [your-email@example.com].
Made with by Het Shah
README.md
file provides comprehensive details about the component, including installation instructions, usage examples, prop descriptions, customization options, and the actual component code. Let me know if you need any more adjustments!FAQs
A versatile and customizable TextField component for React applications, built with MUI.
We found that hetlabs-textfields demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The EU Cyber Resilience Act is prompting compliance requests that open source maintainers may not be obligated or equipped to handle.
Security News
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.