Form
Create efficient and user-friendly forms with Bramble UI's form components. Enhance data collection and validation for seamless web interactions
Usage
import { Form, Input, Range, Autocomplete } from '@/ui'
<Form
legend='Input Types'
btnLabel='Submit'
name='inputexamples'
btnStyles='mx-auto rounded'
onSubmit={onsubmit}
className='w-96 rounded bg-white p-4 text-center'
>
<!-- Enter form content -->
<p>
What's your name?
</p>
<Input
label='Name'
name='name'
/>
</Form>
Inputs
The following shows examples of input[type='text']
, input[type='checkbox']
, input[type='radio']
, input[type='password']
, input[type='color']
, input[type='date']
, input[type='email']
, input[type='file']
, input[type='number']
, input[type='range']
, input[type='text'] list
, Radio Group
Examples
Login
import { Login } from '@/features'
const onsubmit = (event: any) => {
// do something...
}
<Login
method='post'
btnStyles='rounded'
onSubmit={onsubmit}
className='w-80 rounded bg-white p-4 text-center'
/>
Register / Sign-up
import { Register } from '@/features'
const onsubmit = (event: any) => {
// do something...
}
<Register
btnStyles='rounded'
onSubmit={onsubmit}
className='w-80 rounded bg-white p-4 text-center'
/>
User
import { User } from '@/features'
const onsubmit = (event: any) => {
// do something...
}
<Register
btnStyles='rounded'
onSubmit={onsubmit}
className='w-80 rounded bg-white p-4 text-center'
/>
Card Details
import { CreditCard } from '@/features'
const onsubmit = (event: any) => {
// do something...
}
<CreditCard
btnStyles='rounded'
onSubmit={onsubmit}
className='w-80 rounded bg-white p-4 text-center'
/>
Newsletter
import { NewsLetter } from '@/features'
const onsubmit = (event: any) => {
// do something...
}
<NewsLetter
btnStyles='rounded'
onSubmit={onsubmit}
className='w-80 rounded bg-white p-4 text-center'
/>