pressed- Type
boolean- Default
false- Description
- Whether the toggle is currently active.
Search for a command to run...
Components / Actions
இருநிலை மாற்றி
A toggle represents a two-state action button that can be toggled on or off. Unlike a normal button which executes a one-shot action, a toggle holds its pressed state.
இருநிலை மாற்றியானது ஆன் அல்லது ஆஃப் செய்யக்கூடிய இருநிலை செயல் பொத்தானாகும்.
3 parts documented for implementation and review.
<button>Standard interactive button container. Uses rounded-md corners, minimum 48px touch targets, and transitions. The active state adds a light tint and solid accent borders.
Clear action status indicator. Use simple nouns or categories (e.g., 'வடிவமைப்பு', 'குறியீடு').
Critical aria-pressed attribute ('true' or 'false') to expose state representation to screen readers.
pressedbooleanfalseonPressedChange(pressed: boolean) => voidclassNamestring| Prop | Type | Default | Description |
|---|---|---|---|
pressed | boolean | false | Whether the toggle is currently active. |
onPressedChange | (pressed: boolean) => void | - | State change listener callback. |
className | string | - | Custom classes. |
Active and inactive states must be clearly distinct in color weight and border intensity.
மாற்றப்பட்டு மற்றும் மாற்றப்படாத நிலைகள் தெளிவாக வேறுபட வேண்டும்.
Colorblind users may miss the active state if there is no boundary contrast difference or accessibility label.
நிறக்குருடு உள்ளவர்கள் நிலை மாற்றங்களை எளிதாகப் புரிந்து கொள்ள ஏதுவாக எல்லையை தடிமனாக்கவும்.