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

Input Types

What's your name?

How do you take tea?

How old are you?

Radio Group

Enter your password

Choose your favourite colour

Select dates

What's your e-mail address?

What is your avatar?

How many passengers?

Using Counter component

Maximum of 9

Volume Control

Volume: 0.5

Social Links

Where are you from?

Switch?


Examples

Login

Log In
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

Sign Up

Please fill in this form to create an account.

By creating an account you agree to our Terms & Conditions

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

User Details
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

Payment Method

Select your card

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

Sign up for our 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'
/>