Buttons & Actions
Tailwind CSS button components: buttons, button groups, dropdown menus aur toggles focus states aur keyboard support ke saath. HTML aur React copy-paste karein.
0 Components
Buttons aur actions ke zariye log aap ke interface mein kaam karte hain: form submit karna, menu kholna, setting badalna ya koi choice confirm karna. Yeh category Tailwind CSS se style kiye gaye buttons, button groups, dropdowns aur toggles ko cover karti hai.
Waazih hierarchy, visible focus states aur sahi semantics ek aisi button mein farq paida karte hain jo sirf achhi dikhti hai aur ek aisi jise har koi istemaal kar sakta hai.
Aap in button components ke saath kya kar sakte hain
Ek waazih action hierarchy
Main action ke liye solid primary button aur secondary actions ke liye outline ya ghost styles istemaal karein, taake intended path waazih ho.
Groups, dropdowns aur toggles
Mutalliqa actions ko groups mein combine karein, extra options ko dropdown menus mein rakhein aur logon ko settings on ya off karne dein.
Keyboard aur focus friendly
focus-visible rings istemaal karein taake keyboard users dekh sakein ke woh kahan hain, bagair har mouse click par ring add kiye.
In button components ko kyun istemaal karein
- Real button elements ke saath banaye gaye hain, taake Enter aur Space bagair kisi extra code ke kaam karein.
- Consistent sizes aur spacing jo aap ke baaqi Tailwind CSS design ke saath align hoti hain.
- Tailwind CSS ke ilawa koi aur dependencies nahi hain.
Button components: aksar pooche jaane wale sawalat
Kya mujhe button istemaal karna chahiye ya link?
Page par hone wale actions ke liye button istemaal karein, jaise form submit karna ya menu kholna, aur kisi doosre page par jaane ke liye link. Is category ke components is usool par chalte hain taake woh keyboard aur screen reader users ke liye sahi tareeqe se kaam karein.
Main button par loading state kaise dikhaoon?
Request chalne ke dauran button ko disable karein aur iska label badlein, misaal ke taur par Sending. Yeh doosre click se hone wali duplicate submissions ko bhi rokta hai.
Mobile par buttons ka size kya hona chahiye?
Kam az kam 44 by 44 pixels ke tap target ka hadaf rakhein, jo thumb ke liye comfortable hai aur aam accessibility guidance par poora utarta hai.