open- Type
boolean- Default
- -
- Description
- Controlled open state.
Search for a command to run...
Components / Feedback
உரையாடல்
Dialogs are modal overlays that focus the user's attention on a critical task or confirmation. They block the page until dismissed.
உரையாடல்கள் பயனரின் கவனத்தை ஒரு முக்கியமான பணி அல்லது உறுதிப்படுத்தலில் மையப்படுத்தும் மாடல் மேல்படிவுகள்.
5 parts documented for implementation and review.
<div>Semi-transparent dark backdrop (bg-black/50) covering the viewport. Clicking it closes the dialog. Animates in with a fade transition. Uses fixed z-50 positioning. Prevents interaction with content behind the dialog and locks body scroll.
<div>Centered modal panel with role='dialog'. Focus is trapped inside while open — Tab cycles through focusable elements, Escape closes. Max-width controlled via sm:max-w-md or sm:max-w-lg classes. Animates in with scale and fade (zoom-in-95).
<div>Container for DialogTitle (required for accessibility via aria-labelledby) and DialogDescription (linked via aria-describedby). Title should clearly state the dialog purpose. DialogDescription provides supporting context. In Tamil, use natural phrasing.
<div>Action bar at the bottom with flex layout. Convention: Cancel on left (outline variant), primary action on right. On mobile (sm breakpoint), buttons may stack vertically. Include both Tamil and English labels in bilingual contexts.
<button>X icon button in the top-right corner, always present for accessibility. Sized at 16×16px icon within a 32×32px touch target. Provides an alternate dismissal path alongside Escape key. Uses aria-label='Close' for screen readers.
openbooleanonOpenChange(open: boolean) => voidmodalbooleantrue| Prop | Type | Default | Description |
|---|---|---|---|
open | boolean | - | Controlled open state. |
onOpenChange | (open: boolean) => void | - | Fired when dialog opens or closes. |
modal | boolean | true | When true, locks scroll and traps focus. |
Trigger labels must precisely forecast the resulting action. Avoid ambiguous verbs like 'Open'. Use explicit action-object pairs (e.g., 'Edit profile') to establish correct mental models before the context switch.
பயனர் எந்தச் செயலை செய்யப் போகிறார் என்பதை தூண்டிப் பொத்தான்கள் தெளிவாகக் கூற வேண்டும். 'திற' போன்ற பொதுவான வார்த்தைகளைத் தவிர்த்து, 'சுயவிவரம் திருத்து' போன்ற தெளிவான கட்டளைகளைப் பயன்படுத்தவும்.
Standard dialogs lack the friction required to prevent catastrophic errors because they can be dismissed via an accidental Escape keypress or backdrop click. Always use an isolated AlertDialog.
சாதாரண உரையாடல்களைப் பின்னணியைத் தொடுவதன் மூலம் எளிதாக மூடிவிட முடியும் என்பதால், நிரந்தரமான அழிவுச் செயல்களுக்குப் போதுமான தடையை அவை வழங்குவதில்லை. எப்போதும் AlertDialog-ஐப் பயன்படுத்தவும்.
Dialogs must maintain single-task focus. Offload complex configurations to dedicated pages and use dialogs strictly for rapid, localized state mutations without breaking the primary workflow context.
உரையாடல்கள் ஒரு குறிப்பிட்ட பணியை விரைவாகச் செய்து முடிக்க மட்டுமே பயன்படுத்தப்பட வேண்டும். சிக்கலான படிவங்களை நிரப்புவதற்குப் பதிலாக, எளிய மாற்றங்களுக்கு மட்டுமே இவற்றைத் தேர்ந்தெடுக்கவும்.
Never inject massive, multi-step forms or heavy vertical scrolling inside a modal overlay. If a task requires more than 3-4 inputs, it fundamentally violates the modal interaction pattern.
பெரிய படிவங்களையோ, பல-படிநிலைச் செயல்களையோ உரையாடலுக்குள் திணிக்கக் கூடாது. 3-4 உள்ளீடுகளுக்கு மேல் தேவைப்பட்டால், அதை ஒரு தனிப்பக்கமாக உருவாக்குவதே சிறந்த வடிவமைப்பாகும்.