# Feedback Feedback allows users to provide ratings and share opinions about their experience. It supports multiple feedback formats, including thumbs, stars, NPS, and emoji ratings. **Category:** Components **Storybook:** https://doc.ux4g.gov.in/web/?path=/story/ux4g-components-feedback--introduction ## Variants documented in Storybook - Feedback Type: https://doc.ux4g.gov.in/web/?path=/story/ux4g-components-feedback--feedback-type ## Framework setup ### HTML / CDN ```html ``` ### React ```bash npm install ux4g-web-components ``` ```jsx import 'ux4g-web-components/styles.css'; import 'ux4g-web-components/design-system'; ``` ### Angular Update `angular.json`: ```json { "styles": [ "node_modules/ux4g-web-components/styles/ux4g.css", "src/styles.css" ], "scripts": [ "node_modules/ux4g-web-components/dist/runtime/design-system.js" ] } ``` ## Code examples The snippets below are extracted from the Storybook canvas for Feedback. Each example shows the rendered HTML, the equivalent React JSX, and the Angular template markup. ### 1. Feedback Type — Binary Feedback (Thumb) HTML: ```html
Thank you for your feedback. This helps improve government services.
Thank you for your feedback. This helps improve government services.
Thank you for your feedback. This helps improve government services.
Feedback allows users to provide ratings and share opinions about their experience. It supports multiple feedback formats, including thumbs, stars, NPS, and emoji ratings.
Visual demonstration of various Feedback patterns for capturing user input.
Thank you for your feedback. This helps improve government services.
Quickly copy layout and interaction classes for Feedback components.
|
Base Container
ux4g-feedback
|
|
Thumb Wrapper
feedback-thumb-wrapper
|
|
Chip Wrapper
ux4g-feedback-chip-wrapper
|
|
Textarea Wrapper
ux4g-textarea-container
|
|
NPS Wrapper
ux4g-feedback-nps-wrapper
|
|
Submitted Wrapper
feedback-submitted-wrapper
|
|
Thumb Button
feedback-thumb-up
|
|
Star Icon
ux4g-feedback-star
|
|
NPS Score Button
feedback-nps-button
|
|
Emoji Button
feedback-emoji-button
|
Feedback allows users to provide ratings and share opinions about their experience. It supports multiple feedback formats, including thumbs, stars, NPS, and emoji ratings.
Visual demonstration of various Feedback patterns for capturing user input.
Thank you for your feedback. This helps improve government services.
Quickly copy layout and interaction classes for Feedback components.
|
Base Container
ux4g-feedback
|
|
Thumb Wrapper
feedback-thumb-wrapper
|
|
Chip Wrapper
ux4g-feedback-chip-wrapper
|
|
Textarea Wrapper
ux4g-textarea-container
|
|
NPS Wrapper
ux4g-feedback-nps-wrapper
|
|
Submitted Wrapper
feedback-submitted-wrapper
|
|
Thumb Button
feedback-thumb-up
|
|
Star Icon
ux4g-feedback-star
|
|
NPS Score Button
feedback-nps-button
|
|
Emoji Button
feedback-emoji-button
|
Feedback allows users to provide ratings and share opinions about their experience. It supports multiple feedback formats, including thumbs, stars, NPS, and emoji ratings.
Visual demonstration of various Feedback patterns for capturing user input.
Thank you for your feedback. This helps improve government services.
Quickly copy layout and interaction classes for Feedback components.
|
Base Container
ux4g-feedback
|
|
Thumb Wrapper
feedback-thumb-wrapper
|
|
Chip Wrapper
ux4g-feedback-chip-wrapper
|
|
Textarea Wrapper
ux4g-textarea-container
|
|
NPS Wrapper
ux4g-feedback-nps-wrapper
|
|
Submitted Wrapper
feedback-submitted-wrapper
|
|
Thumb Button
feedback-thumb-up
|
|
Star Icon
ux4g-feedback-star
|
|
NPS Score Button
feedback-nps-button
|
|
Emoji Button
feedback-emoji-button
|