Custom width for Alert #2325
-
Hey Team, we are using alert component to display error on our page. How can we set custom width to alert component so then it can looked aligned (stretched to full width) with all other components or is there any other solution to make it look better? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
Hi @Joshi-Kajal! A toast component may actually be a more appropriate component here. Toast is meant to be used when there is direct feedback for the user based on their action. You should also use an error help text on the field that has an issue so that users know which field has a problem. There is an example on the input docs site: https://paste.twilio.design/components/input#input-with-inline-error. |
Beta Was this translation helpful? Give feedback.
-
Hey @shleewhite , On login page, for some case we throttle user and disable login for 30 seconds and displaying 30 seconds timer as part of alert! Would it be equal impactful to display timer in toast? To maintain consistency across all error scenario, we choose to go with alert for all cases! Can you guide on design alternative for timer scenario? |
Beta Was this translation helpful? Give feedback.
-
@Joshi-Kajal Here is a summary of the above discussion 👇 ℹ️ Use the error variant of help text paired with an input to communicate that either the password or username are incorrect. Check out this example here. 🔔 Use an alert to communicate the time remaining until the user may attempt again. Be sure that the alert spans the content width of the input. The implementation details for this depend on how the UI is implemented. Checkout these examples of how this could be accomplished. Thanks for reaching out, and please do let us know if you have any more questions. 😄 |
Beta Was this translation helpful? Give feedback.
@Joshi-Kajal Here is a summary of the above discussion 👇
ℹ️ Use the error variant of help text paired with an input to communicate that either the password or username are incorrect. Check out this example here.
🔔 Use an alert to communicate the time remaining until the user may attempt again. Be sure that the alert spans the content width of the input. The implementation details for this depend on how the UI is implemented. Checkout these examples of how this could be accomplished.
Thanks for reaching out, and please do let us know if you have any more questions. 😄