Feedback component can be used to give more information to the user about the input field. It can be used to give a hint about the input field or to give an error message.
The feedback component comes in four variants. The info variant is used to give information to the user, the error variant is used to give an error message, the warning variant is used to give a warning message, and the success variant is used to give a success message.
The feedback component comes with a subtle variant. The subtle variant is used to give a subtle message to the user.
The feedback component comes in two sizes: small, and large. The default size is sm
.
The feedback component can have a custom icon. The icon can be added by using the icon
slot.
import { DapDSFeedback } from 'dap-design-system/dist/dds'
import { DapDSFeedbackReact } from 'dap-design-system/dist/react'
Property | Type | Default | Description |
---|---|---|---|
feedback | string | The feedback message. | |
feedbackSize | 'negative' , 'positive' , 'warning' | The type of the feedback. | |
feedbackSubtle | boolean | The weight of the feedback. | |
feedbackNoMargin | boolean | Removes the margins around the feedback. | |
feedbackId | string | The id of the feedback. |
Name | Description |
---|---|
icon | The custom icon of the feedback. |
(default) | The text of the feedback. |
No custom events available.
Part Name | Description |
---|---|
base | The main feedback container. |
icon | The icon of the feedback. |
text | The text of the feedback. |
Property Name | Description |
---|---|
--dds-feedback-spacing | The spacing around the feedback component. Default is `var(--dds-spacing-200)`. |
--dds-feedback-color | The text color of the feedback. Default is `var(--dds-text-positive-subtle)`. |
--dds-feedback-font-size | The font size of the feedback. Default is `var(--dds-font-sm)`. |
--dds-feedback-font-weight | The font weight of the feedback. Default is `var(--dds-font-weight-bold)`. |
--dds-feedback-icon-fill | The fill color of the feedback icon. Default is `var(--dds-icon-positive-subtle)`. |
--dds-feedback-icon-spacing | The spacing between the icon and text. Default is `var(--dds-spacing-100)`. |
--dds-feedback-color-warning | The text color for warning feedback. Default is `var(--dds-text-neutral-base)`. |
--dds-feedback-color-positive | The text color for positive feedback. Default is `var(--dds-text-positive-subtle)`. |
--dds-feedback-color-negative | The text color for negative feedback. Default is `var(--dds-text-negative-subtle)`. |
--dds-feedback-icon-fill-warning | The icon fill color for warning feedback. Default is `var(--dds-icon-informative-subtle)`. |
--dds-feedback-icon-fill-positive | The icon fill color for positive feedback. Default is `var(--dds-icon-positive-subtle)`. |
--dds-feedback-icon-fill-negative | The icon fill color for negative feedback. Default is `var(--dds-icon-negative-subtle)`. |