Use our Tailwind CSS Input built with Angular to collect and process user data on your website or applications.
Inputs are pivotal UI components in web design, allowing users to interact by providing information, such as text, numbers, or dates, to a website or application. For smooth user interaction, inputs should provide clear visual feedback, including placeholder text, a focus state, or even error messages when data is incorrect.
Below we present you our Angular Input example crafted with Tailwind CSS that ensures seamless user experience and facilitates the creation of enterprise-level applications with proficiency. Check it out!
You first need to import the DUIInput Module into your application module
Code
import { DUIInput } from "david-ui-angular"; @NgModule({ declarations: [AppComponent], imports: [BrowserModule, DUIInput], providers: [], bootstrap: [AppComponent], }) export class AppModule {}
Preview
Code
<dui-input label="Username"></dui-input>
You can use different variants of the input component by manipulating the variant
attribute of the component
Preview
Code
<dui-input label="Username"></dui-input> <dui-input variant="standard" label="Username"></dui-input> <dui-input variant="static" label="Username"></dui-input>
The Input component comes with 2 different sizes that you can change it using the size
prop.
Preview
Code
<dui-input size="md" label="Outlined Medium"></dui-input> <dui-input size="lg" label="Outlined Large"></dui-input>
You can use different colors of the input component by manipulating the color
attribute of the component
Preview
Code
<dui-input color="purple" label="Username"></dui-input> <dui-input color="yellow" label="Username"></dui-input> <dui-input color="green" label="Username"></dui-input>
The following properties are available for dui-input
Attribute | Type | Description | Default |
---|---|---|---|
variant | Variant | change input variant | filled |
color | Color | change input color | gray |
className | string | Add custom className for input | '' |
size | boolean | Change input size | md |
label | string | Label for input | Enter your text |
name | string | Name prop for input | '' |
type | string | Type prop for input | text |
error | boolean | Change input state to error | false |
success | boolean | Change input state to success | false |
disabled | boolean | Disable input | false |
required | boolean | Make input as required | false |
readonly | boolean | Make input readonly | false |