[{"data":1,"prerenderedAt":5888},["ShallowReactive",2],{"content-navigation":3,"$fY4mAj2l3kRkTDttxn6FGzqBc2O9HAJ2qp-_8LmMX7aw":1825,"/tutorials/projects/build-a-user-feedback-widget-with-vue-js":1830},[4,112,119,224,333,429,481,1087,1113,1142],{"title":5,"path":6,"stem":7,"children":8,"page":89},"Partials","/_partials","_partials",[9,15,20,25,29,33,38,42,47,51,56,60,64,68,90,94,98,103,108],{"title":10,"path":11,"stem":12,"description":13,"icon":14,"links":14},"Advanced Field Creation Mode","/_partials/advanced-field-creation-mode","_partials/advanced-field-creation-mode","You can use these advanced options to automatically set the values of fields at specific events by clicking on \"Continue in Advanced Field Creation Mode\".",null,{"title":16,"path":17,"stem":18,"description":19,"icon":14,"links":14},"Authentication","/_partials/authentication","_partials/authentication","While the Public role can be configured to make data available without authentication, anything that is not public requires a user to authenticate their requests.",{"title":21,"path":22,"stem":23,"description":24,"icon":14,"links":14},"Config Env Vars","/_partials/config-env-vars","_partials/config-env-vars","",{"title":26,"path":27,"stem":28,"description":24,"icon":14,"links":14},"Deployment Public Instance","/_partials/deployment-public-instance","_partials/deployment-public-instance",{"title":30,"path":31,"stem":32,"description":24,"icon":14,"links":14},"Engine Studio Box","/_partials/engine-studio-box","_partials/engine-studio-box",{"title":34,"path":35,"stem":36,"description":37,"icon":14,"links":14},"Extension Hook Footguns","/_partials/extension-hook-footguns","_partials/extension-hook-footguns","Directus reads system collections to operate. Be careful when modifying the output of system collection read or query events. Also ensure not to directly or indirectly emit the same event your hook is handling or you will create an infinite loop.",{"title":39,"path":40,"stem":41,"description":24,"icon":14,"links":14},"Extension Hook System Collections","/_partials/extension-hook-system-collections","_partials/extension-hook-system-collections",{"title":43,"path":44,"stem":45,"description":46,"icon":14,"links":14},"Extensions Api","/_partials/extensions-api","_partials/extensions-api","This extension type is loaded into the Directus process. They can use the provided services exported by the @directus/extensions-sdk package and can be written in JavaScript or TypeScript.",{"title":48,"path":49,"stem":50,"description":24,"icon":14,"links":14},"Extensions Api Internals","/_partials/extensions-api-internals","_partials/extensions-api-internals",{"title":52,"path":53,"stem":54,"description":55,"icon":14,"links":14},"Extensions App","/_partials/extensions-app","_partials/extensions-app","This extension type is loaded into the Directus Data Studio. They are are built with Vue 3, and can use the provided composables exported by the @directus/extensions-sdk package. Extensions can be written in JavaScript or TypeScript.",{"title":57,"path":58,"stem":59,"description":24,"icon":14,"links":14},"Extensions App Internals","/_partials/extensions-app-internals","_partials/extensions-app-internals",{"title":61,"path":62,"stem":63,"description":24,"icon":14,"links":14},"Extensions Theme","/_partials/extensions-theme","_partials/extensions-theme",{"title":65,"path":66,"stem":67,"description":24,"icon":14,"links":14},"Extensions Uid","/_partials/extensions-uid","_partials/extensions-uid",{"title":69,"path":70,"stem":71,"children":72,"page":89},"Home Hero","/_partials/home-hero","_partials/home-hero",[73,77,81,85],{"title":74,"path":75,"stem":76,"description":24,"icon":14,"links":14},"Auth","/_partials/home-hero/auth","_partials/home-hero/auth",{"title":78,"path":79,"stem":80,"description":24,"icon":14,"links":14},"Data","/_partials/home-hero/data","_partials/home-hero/data",{"title":82,"path":83,"stem":84,"description":24,"icon":14,"links":14},"File","/_partials/home-hero/file","_partials/home-hero/file",{"title":86,"path":87,"stem":88,"description":24,"icon":14,"links":14},"Realtime","/_partials/home-hero/realtime","_partials/home-hero/realtime",false,{"title":91,"path":92,"stem":93,"description":24,"icon":14,"links":14},"Json Function","/_partials/json-function","_partials/json-function",{"title":95,"path":96,"stem":97,"description":24,"icon":14,"links":14},"License","/_partials/license","_partials/license",{"title":99,"path":100,"stem":101,"description":102,"icon":14,"links":14},"Query Functions","/_partials/query-functions","_partials/query-functions","Functions accept a field and return a modified value. Functions can be used in any query parameter you'd normally supply a field key, including fields, aggregation, and filters.",{"title":104,"path":105,"stem":106,"description":107,"icon":14,"links":14},"Quickstart Making Calls","/_partials/quickstart-making-calls","_partials/quickstart-making-calls","You can use a visual API testing tool like Postman or Hoppscotch, a terminal-based based tool like curl or HTTPie, or make HTTP requests directly in a script written in your programming language of choice.",{"title":109,"path":110,"stem":111,"description":24,"icon":14,"links":14},"Snippet Auth Token","/_partials/snippet-auth-token","_partials/snippet-auth-token",{"title":113,"path":114,"stem":115,"children":116,"description":118,"icon":14,"links":14},"Directus API Reference","/api","api/index",[117],{"title":113,"path":114,"stem":115,"description":118,"icon":14,"links":14},"Learn how to use our API",{"title":120,"path":121,"stem":122,"children":123,"page":89},"Cloud","/cloud","cloud",[124,144,174,204],{"title":125,"path":126,"stem":127,"children":128,"page":89},"Getting Started","/cloud/getting-started","cloud/1.getting-started",[129,134,139],{"title":130,"path":131,"stem":132,"description":133,"icon":14,"links":14},"Introduction","/cloud/getting-started/introduction","cloud/1.getting-started/1.introduction","Whether you're a hobbyist, startup, or enterprise, our flexible Directus Cloud platform lets you get up and running with Directus quickly.",{"title":135,"path":136,"stem":137,"description":138,"icon":14,"links":14},"Cloud Teams","/cloud/getting-started/teams","cloud/1.getting-started/2.teams","A team is an organizational system that groups accounts together as team members and provides consolidated billing for projects.",{"title":140,"path":141,"stem":142,"description":143,"icon":14,"links":14},"Managing Cloud Accounts","/cloud/getting-started/accounts","cloud/1.getting-started/3.accounts","An account is your portal to Directus Cloud. You can use it to manage your teams, team members, projects and billing.",{"title":145,"path":146,"stem":147,"children":148,"page":89},"Projects","/cloud/projects","cloud/2.projects",[149,154,159,164,169],{"title":150,"path":151,"stem":152,"description":153,"icon":14,"links":14},"Create a Project","/cloud/projects/create","cloud/2.projects/1.create","Create a project in Directus Cloud.",{"title":155,"path":156,"stem":157,"description":158,"icon":14,"links":14},"Destroy a Project","/cloud/projects/destroy","cloud/2.projects/2.destroy","Destroy a Directus Cloud project and cancel your subscription.",{"title":160,"path":161,"stem":162,"description":163,"icon":14,"links":14},"Version Upgrades","/cloud/projects/version-upgrades","cloud/2.projects/3.version-upgrades","Learn about automatic upgrades and version locking in Directus Cloud.",{"title":165,"path":166,"stem":167,"description":168,"icon":14,"links":14},"Monitoring Projects","/cloud/projects/monitoring","cloud/2.projects/4.monitoring","Learn how to monitor your Directus Cloud project.",{"title":170,"path":171,"stem":172,"description":173,"icon":14,"links":14},"Backups","/cloud/projects/backups","cloud/2.projects/5.backups","Learn about automatic backups in Directus Cloud.",{"title":175,"path":176,"stem":177,"children":178,"page":89},"Configuration","/cloud/configuration","cloud/3.configuration",[179,184,189,194,199],{"title":180,"path":181,"stem":182,"description":183,"icon":14,"links":14},"Custom Domains","/cloud/configuration/custom-domains","cloud/3.configuration/1.custom-domains","Learn how to set up a custom domain for your Directus Enterprise Cloud project.",{"title":185,"path":186,"stem":187,"description":188,"icon":14,"links":14},"Environment Variables","/cloud/configuration/environment-variables","cloud/3.configuration/2.environment-variables","Learn about environment variables in Directus Cloud.",{"title":190,"path":191,"stem":192,"description":193,"icon":14,"links":14},"Direct Database Access","/cloud/configuration/direct-database-access","cloud/3.configuration/3.direct-database-access","Learn how to directly access your Directus Cloud project's database.",{"title":195,"path":196,"stem":197,"description":198,"icon":14,"links":14},"Custom Extensions","/cloud/configuration/custom-extensions","cloud/3.configuration/4.custom-extensions","Learn how to deploy custom extensions to your Directus Cloud project.",{"title":200,"path":201,"stem":202,"description":203,"icon":14,"links":14},"Datacenter Regions","/cloud/configuration/datacenter-regions","cloud/3.configuration/5.datacenter-regions","Learn where datacenters for cloud projects are located.",{"title":205,"path":206,"stem":207,"children":208,"page":89},"Billing","/cloud/billing","cloud/4.billing",[209,214,219],{"title":210,"path":211,"stem":212,"description":213,"icon":14,"links":14},"Manage Billing","/cloud/billing/manage-billing","cloud/4.billing/1.manage-billing","Learn how to manage billing for your Directus Cloud project.",{"title":215,"path":216,"stem":217,"description":218,"icon":14,"links":14},"Changing Your Tier","/cloud/billing/changing-tier","cloud/4.billing/2.changing-tier","Learn how to change the tier of your Directus Cloud project.",{"title":220,"path":221,"stem":222,"description":223,"icon":14,"links":14},"Cancel Your Subscription","/cloud/billing/cancel-subscription","cloud/4.billing/3.cancel-subscription","Learn how to cancel your Directus Cloud project subscription.",{"title":225,"path":226,"stem":227,"children":228,"page":89},"Community","/community","community",[229,249,274,293,318],{"title":230,"path":231,"stem":232,"children":233,"page":89},"Overview","/community/overview","community/1.overview",[234,239,244],{"title":235,"path":236,"stem":237,"description":238,"icon":14,"links":14},"Welcome","/community/overview/welcome","community/1.overview/1.welcome","Welcome to the Directus community!",{"title":240,"path":241,"stem":242,"description":243,"icon":14,"links":14},"Code of Conduct","/community/overview/conduct","community/1.overview/2.conduct","Our standards, responsibilities, and enforcement guidelines to create a positive community.",{"title":245,"path":246,"stem":247,"description":248,"icon":14,"links":14},"Moderation Guidelines","/community/overview/moderation","community/1.overview/3.moderation","Guidelines we give to community moderators.",{"title":250,"path":251,"stem":252,"children":253,"page":89},"Contribution","/community/contribution","community/2.contribution",[254,259,264,269],{"title":255,"path":256,"stem":257,"description":258,"icon":14,"links":14},"Translations","/community/contribution/translations","community/2.contribution/1.translations","How to contribute to translating the Data Studio.",{"title":260,"path":261,"stem":262,"description":263,"icon":14,"links":14},"Documentation","/community/contribution/documentation","community/2.contribution/2.documentation","How to contribute to the Directus documentation.",{"title":265,"path":266,"stem":267,"description":268,"icon":14,"links":14},"Feature Requests","/community/contribution/feature-requests","community/2.contribution/3.feature-requests","How to add feature requests, and our process for reviewing them.",{"title":270,"path":271,"stem":272,"description":273,"icon":14,"links":14},"Pull Requests","/community/contribution/pull-requests","community/2.contribution/4.pull-requests","Our process for contributing pull requests to Directus.",{"title":275,"path":276,"stem":277,"children":278,"page":89},"Codebase","/community/codebase","community/3.codebase",[279,283,288],{"title":275,"path":280,"stem":281,"description":282,"icon":14,"links":14},"/community/codebase/overview","community/3.codebase/1.overview","Overview of the Directus codebase for new contributors",{"title":284,"path":285,"stem":286,"description":287,"icon":14,"links":14},"Development Environment","/community/codebase/dev-environment","community/3.codebase/2.dev-environment","How to set up and run a development environment for Directus so that you can work on the platform's source code.",{"title":289,"path":290,"stem":291,"description":292,"icon":14,"links":14},"Testing","/community/codebase/testing","community/3.codebase/3.testing","How to run unit and blackbox tests in the Directus codebase.",{"title":294,"path":295,"stem":296,"children":297,"page":89},"Reporting And Support","/community/reporting-and-support","community/4.reporting-and-support",[298,303,308,313],{"title":299,"path":300,"stem":301,"description":302,"icon":14,"links":14},"Troubleshooting Steps","/community/reporting-and-support/troubleshooting-steps","community/4.reporting-and-support/1.troubleshooting-steps","If you're experiencing issues or think you have found a problem in Directus, be sure to follow these steps.",{"title":304,"path":305,"stem":306,"description":307,"icon":14,"links":14},"Bug Reporting","/community/reporting-and-support/bug-reporting","community/4.reporting-and-support/2.bug-reporting","How to report bugs in Directus.",{"title":309,"path":310,"stem":311,"description":312,"icon":14,"links":14},"Security Reporting","/community/reporting-and-support/security-reporting","community/4.reporting-and-support/3.security-reporting","How to report security issues in Directus.",{"title":314,"path":315,"stem":316,"description":317,"icon":14,"links":14},"Customer Support","/community/reporting-and-support/customer-support","community/4.reporting-and-support/4.customer-support","How to get help with Directus as a user and customer.",{"title":319,"path":320,"stem":321,"children":322,"page":89},"Programs","/community/programs","community/5.programs",[323,328],{"title":324,"path":325,"stem":326,"description":327,"icon":14,"links":14},"Guest Authors","/community/programs/guest-authors","community/5.programs/1.guest-authors","Our guest author program invites authors to join and get paid to write tutorials for the Directus community.",{"title":329,"path":330,"stem":331,"description":332,"icon":14,"links":14},"Directus Labs","/community/programs/directus-labs","community/5.programs/2.directus-labs","Directus Labs is the official organization for Directus templates, settings and experimental projects.",{"title":175,"path":334,"stem":335,"children":336,"page":89},"/configuration","configuration",[337,341,346,351,356,361,366,371,376,381,386,391,396,401,406,410,415,420,425],{"title":130,"path":338,"stem":339,"description":340,"icon":14,"links":14},"/configuration/intro","configuration/0.intro","Environment variables are used for all configuration within a Directus project. These variables can be defined in a number of ways, which we cover below.",{"title":342,"path":343,"stem":344,"description":345,"icon":14,"links":14},"General","/configuration/general","configuration/1.general","Configuration for the general system, server, first admin user, and telemetry.",{"title":347,"path":348,"stem":349,"description":350,"icon":14,"links":14},"AI","/configuration/ai","configuration/ai","Configuration for AI Assistant and Model Context Protocol (MCP) features.",{"title":352,"path":353,"stem":354,"description":355,"icon":14,"links":14},"Auth & SSO","/configuration/auth-sso","configuration/auth-sso","Configuration for authentication methods, including local email/password, OAuth 2.0, OpenID, LDAP, and SAML.",{"title":357,"path":358,"stem":359,"description":360,"icon":14,"links":14},"Cache","/configuration/cache","configuration/cache","Configuration for internal and output caching.",{"title":362,"path":363,"stem":364,"description":365,"icon":14,"links":14},"Database","/configuration/database","configuration/database","Configuration for database connections.",{"title":367,"path":368,"stem":369,"description":370,"icon":14,"links":14},"Email","/configuration/email","configuration/email","Configuration for email settings and templates.",{"title":372,"path":373,"stem":374,"description":375,"icon":14,"links":14},"Extensions","/configuration/extensions","configuration/extensions","Configuration for extensions and the Directus Marketplace.",{"title":377,"path":378,"stem":379,"description":380,"icon":14,"links":14},"Files","/configuration/files","configuration/files","Configuration for storage locations, metadata, upload limits, and transformations.",{"title":382,"path":383,"stem":384,"description":385,"icon":14,"links":14},"Flows","/configuration/flows","configuration/flows","Configure environment variables, memory, and timeout for Flows.",{"title":387,"path":388,"stem":389,"description":390,"icon":14,"links":14},"Logging","/configuration/logging","configuration/logging","Configuration for general and Realtime logging.",{"title":392,"path":393,"stem":394,"description":395,"icon":14,"links":14},"Metrics","/configuration/metrics","configuration/metrics","Configuration for metrics.",{"title":397,"path":398,"stem":399,"description":400,"icon":14,"links":14},"Migrations","/configuration/migrations","configuration/migrations","Creation of custom migration files to automate database changes.",{"title":402,"path":403,"stem":404,"description":405,"icon":14,"links":14},"PM2","/configuration/pm2","configuration/pm2","Configuration for PM2, the process manager for Directus.",{"title":86,"path":407,"stem":408,"description":409,"icon":14,"links":14},"/configuration/realtime","configuration/realtime","Configuration for WebSockets and GraphQL Subscriptions.",{"title":411,"path":412,"stem":413,"description":414,"icon":14,"links":14},"Security & Limits","/configuration/security-limits","configuration/security-limits","Configuration for access tokens, cookies, CSP, hashing, CORS, rate limiting, and request limits.",{"title":416,"path":417,"stem":418,"description":419,"icon":14,"links":14},"Synchronization","/configuration/synchronization","configuration/synchronization","Configuration around synchronization and Redis.",{"title":421,"path":422,"stem":423,"description":424,"icon":14,"links":14},"Theming","/configuration/theming","configuration/theming","Configuration of the Data Studio's theming engine and appearance settings.",{"title":255,"path":426,"stem":427,"description":428,"icon":14,"links":14},"/configuration/translations","configuration/translations","Directus supports translations for both the Data Studio UI and authored content.",{"title":125,"description":14,"icon":14,"links":14,"path":430,"stem":431,"children":432,"page":89},"/getting-started","getting-started",[433,437,442,446,451,456,461,466,471,476],{"title":230,"path":434,"stem":435,"description":436,"icon":14,"links":14},"/getting-started/overview","getting-started/1.overview","Learn about the Directus Data Engine and Studio, when to use it, and a how it works.",{"title":438,"path":439,"stem":440,"description":441,"icon":14,"links":14},"Accessibility","/getting-started/accessibility","getting-started/10.accessibility","We are always looking for ways to make Directus Studio more accessible. Here are some of the methods we currently support.",{"title":150,"path":443,"stem":444,"description":445,"icon":14,"links":14},"/getting-started/create-a-project","getting-started/2.create-a-project","Learn about how to create a managed Directus project or self-host with Docker.",{"title":447,"path":448,"stem":449,"description":450,"icon":14,"links":14,"label":447},"Configure a Data Model","/getting-started/data-model","getting-started/3.data-model","This guide will cover creating a collection in Directus via the Data Studio, creating fields, and configuring relationships.",{"title":452,"path":453,"stem":454,"description":455,"icon":14,"links":14},"Use the API","/getting-started/use-the-api","getting-started/4.use-the-api","Get started with Directus APIs. Learn to interact with collections, fetch, and create data.",{"title":457,"path":458,"stem":459,"description":460,"icon":14,"links":14},"Authenticate a User","/getting-started/authenticate-user","getting-started/5.authenticate-user","Get started with Directus Auth. Learn how to register, login, create users, and make authenticated requests.",{"title":462,"path":463,"stem":464,"description":465,"icon":14,"links":14},"Upload & Access Files","/getting-started/upload-files","getting-started/6.upload-files","This guide will cover importing a file via URL, requesting assets, and using transformation parameters.",{"title":467,"path":468,"stem":469,"description":470,"icon":14,"links":14},"Create an Automation","/getting-started/create-an-automation","getting-started/7.create-an-automation","Get started using flows, triggers, operations and the data chain in Directus Automate.",{"title":472,"path":473,"stem":474,"description":475,"icon":14,"links":14},"Connect to Realtime Data","/getting-started/connect-to-realtime","getting-started/8.connect-to-realtime","This guide will cover connecting to Directus via WebSockets on the web, subscribing to changes, and creating new items over the connection.",{"title":477,"path":478,"stem":479,"description":480,"icon":14,"links":14},"Resources & Links","/getting-started/resources","getting-started/9.resources","Key links across the Directus ecosystem.",{"title":482,"path":483,"stem":484,"children":485,"page":89},"Guides","/guides","guides",[486,512,595,642,677,707,732,756,771,886,899,988],{"title":487,"description":14,"icon":488,"links":14,"path":489,"stem":490,"children":491,"page":89},"Data Model","directus-explore","/guides/data-model","guides/01.data-model",[492,497,502,507],{"title":493,"path":494,"stem":495,"description":496,"icon":14,"links":14},"Collections","/guides/data-model/collections","guides/01.data-model/1.collections","Directus collections help you manage your data. Create custom collections, define fields, configure relationships, and leverage features like content versioning and access control. Learn how to create, configure, and manage collections in Directus.",{"title":498,"path":499,"stem":500,"description":501,"icon":14,"links":14},"Fields","/guides/data-model/fields","guides/01.data-model/2.fields","Directus fields let you define how your data is stored and displayed. Learn about creating fields, data types, interfaces, validations, relationships, and more. Discover how to configure fields to perfectly suit your data modeling needs in Directus.",{"title":503,"path":504,"stem":505,"description":506,"icon":14,"links":14},"Interfaces","/guides/data-model/interfaces","guides/01.data-model/3.interfaces","Manage your data effectively with Directus fields. Discover various field types, interfaces, validations, and relationships to perfectly suit your data modeling needs.",{"title":508,"path":509,"stem":510,"description":511,"icon":14,"links":14},"Relationships","/guides/data-model/relationships","guides/01.data-model/4.relationships","Leverage Directus relationships to create powerful data connections. Explore Many to One, One to Many, Many to Many, and Many to Any relationships, along with Translations for multilingual content management.",{"title":513,"description":14,"icon":514,"links":14,"path":515,"stem":516,"children":517,"page":89},"Content","directus-editor","/guides/content","guides/02.content",[518,523,528,533,538,543,548,552,574],{"title":519,"path":520,"stem":521,"description":522,"icon":14,"links":14},"Collection Explorer","/guides/content/explore","guides/02.content/1.explore","Learn to filter, layout, batch edit and more with collections in the collection explorer.",{"title":524,"path":525,"stem":526,"description":527,"icon":14,"links":14},"Item Editor","/guides/content/editor","guides/02.content/2.editor","Learn to create, duplicate, archive and perform other actions with items using Directus.",{"title":529,"path":530,"stem":531,"description":532,"icon":14,"links":14},"Layouts","/guides/content/layouts","guides/02.content/3.layouts","Learn to use layouts for viewing and interacting with items in a collection using Directus.",{"title":534,"path":535,"stem":536,"description":537,"icon":14,"links":14},"Import & Export","/guides/content/import-export","guides/02.content/4.import-export","Learn to import and export multiple items stored as files using Directus.",{"title":539,"path":540,"stem":541,"description":542,"icon":14,"links":14},"Live Preview","/guides/content/live-preview","guides/02.content/5.live-preview","Learn to set up your project for live previewing items from your application.",{"title":544,"path":545,"stem":546,"description":547,"icon":14,"links":14},"Content Versioning","/guides/content/content-versioning","guides/02.content/6.content-versioning","This guide covers the process of enabling and utilizing Content Versioning in Directus.",{"title":255,"path":549,"stem":550,"description":551,"icon":14,"links":14},"/guides/content/translations","guides/02.content/7.translations","Both content and the data studio can be translated into multiple languages.",{"title":553,"path":554,"stem":555,"children":556,"description":558,"icon":14,"links":14},"Visual Editor","/guides/content/visual-editor","guides/02.content/8.visual-editor/0.index",[557,559,564,569],{"title":553,"path":554,"stem":555,"description":558,"icon":14,"links":14},"The Directus visual editor module allows you to visually edit the content of your website directly in-place.",{"title":560,"path":561,"stem":562,"description":563,"icon":14,"links":14},"Frontend Library","/guides/content/visual-editor/frontend-library","guides/02.content/8.visual-editor/1.frontend-library","A library that allows your website to communicate with your Directus project and enables Visual Editing.",{"title":565,"path":566,"stem":567,"description":568,"icon":14,"links":14},"Studio Module","/guides/content/visual-editor/studio-module","guides/02.content/8.visual-editor/2.studio-module","Learn how to edit your website's content in place from within the Directus Studio.",{"title":570,"path":571,"stem":572,"description":573,"icon":14,"links":14},"Customization","/guides/content/visual-editor/customization","guides/02.content/8.visual-editor/3.customization","Customize the styling of your Visual Editing experience to suit your brand or website theming.",{"title":575,"path":576,"stem":577,"children":578,"description":580,"icon":14,"links":14},"Collaborative Editing","/guides/content/collaborative-editing","guides/02.content/9.collaborative-editing/0.index",[579,581,585,590],{"title":575,"path":576,"stem":577,"description":580,"icon":14,"links":14},"Directus Collaborative Editing enables real-time data synchronization and collaborative editing across collections, allowing multiple users to edit content simultaneously without conflicts.",{"title":175,"path":582,"stem":583,"description":584,"icon":14,"links":14},"/guides/content/collaborative-editing/configuration","guides/02.content/9.collaborative-editing/1.configuration","Learn how to configure Collaborative Editing in your Directus project.",{"title":586,"path":587,"stem":588,"description":589,"icon":14,"links":14},"Usage Guide","/guides/content/collaborative-editing/usage","guides/02.content/9.collaborative-editing/2.usage","Learn how to use Collaborative Editing for real-time collaboration on content in your Directus project.",{"title":591,"path":592,"stem":593,"description":594,"icon":14,"links":14},"Development & Custom Extensions","/guides/content/collaborative-editing/development","guides/02.content/9.collaborative-editing/3.development","Learn how Custom Interfaces integrate with Collaborative Editing in Directus.",{"title":74,"description":14,"icon":596,"links":14,"path":597,"stem":598,"children":599,"page":89},"directus-auth","/guides/auth","guides/03.auth",[600,605,610,615,620,625,630],{"title":601,"path":602,"stem":603,"description":604,"icon":14,"links":14},"Access Tokens","/guides/auth/tokens-cookies","guides/03.auth/1.tokens-cookies","Learn how to authenticate requests & explore standard, session, and static token types.",{"title":606,"path":607,"stem":608,"description":609,"icon":14,"links":14},"Access Control","/guides/auth/access-control","guides/03.auth/2.access-control","Manage user and role permissions and policies for interacting with data in Directus.",{"title":611,"path":612,"stem":613,"description":614,"icon":14,"links":14},"Creating Users","/guides/auth/creating-users","guides/03.auth/3.creating-users","Learn about creating users in directus, including API creation, inviting users, and seamless invites.",{"title":616,"path":617,"stem":618,"description":619,"icon":14,"links":14},"Email Login","/guides/auth/email-login","guides/03.auth/4.email-login","Learn about user registration, login with standard/session tokens, refresh, logout, and resetting passwords.",{"title":621,"path":622,"stem":623,"description":624,"icon":14,"links":14},"Two-Factor Auth","/guides/auth/2fa","guides/03.auth/5.2fa","Secure your logins with one-time codes! Learn how to generate secrets, enable/disable 2FA.",{"title":626,"path":627,"stem":628,"description":629,"icon":14,"links":14},"Accountability","/guides/auth/accountability","guides/03.auth/6.accountability","Learn to audit user activity and enforce accountability using the activity feed.",{"title":631,"path":632,"stem":633,"children":634,"description":636,"icon":14,"links":14},"Single Sign-On","/guides/auth/sso","guides/03.auth/7.sso/1.index",[635,637],{"title":631,"path":632,"stem":633,"description":636,"icon":14,"links":14},"Single Sign-On is a mechanism which allows to use external providers to login into systems.",{"title":638,"path":639,"stem":640,"description":641,"icon":14,"links":14},"Seamless SSO","/guides/auth/sso/seamless","guides/03.auth/7.sso/2.seamless","Seamless SSO is a setup to allow logging in without the user ever seeing Directus' login page.",{"title":643,"description":14,"icon":644,"links":14,"path":645,"stem":646,"children":647,"page":89},"Connect","directus-connect","/guides/connect","guides/04.connect",[648,652,657,662,667,672],{"title":16,"path":649,"stem":650,"description":651,"icon":14,"links":14},"/guides/connect/authentication","guides/04.connect/1.authentication","Discover how to authenticate Directus Connect requests using authorization headers, session cookies, or query parameters.",{"title":653,"path":654,"stem":655,"description":656,"icon":14,"links":14},"Filter Rules","/guides/connect/filter-rules","guides/04.connect/2.filter-rules","Learn about filter rules in Directus - available operators, filter syntax, relational fields, dynamic variables, logical operators, and functions parameters. Understand how to build complex filters for permissions, validations, and automations.",{"title":658,"path":659,"stem":660,"description":661,"icon":14,"links":14},"Query Parameters","/guides/connect/query-parameters","guides/04.connect/3.query-parameters","Learn about Directus query parameters - fields, filter, search, sort, limit, offset, page, aggregate, groupBy, deep, alias, and export. Understand how to customize your API requests and retrieve specific data from your collections.",{"title":663,"path":664,"stem":665,"description":666,"icon":14,"links":14},"Relational Data","/guides/connect/relations","guides/04.connect/4.relations","Directus enables you to manage and interact with relational data. This section will guide you through the different types of relationships and how to work with them.",{"title":668,"path":669,"stem":670,"description":671,"icon":14,"links":14},"Error Codes","/guides/connect/errors","guides/04.connect/5.errors","Learn about Directus error codes - understand what each code means, from validation failures to rate limits exceeded. Troubleshoot issues with your API requests and resolve errors efficiently.",{"title":673,"path":674,"stem":675,"description":676,"icon":14,"links":14},"Directus SDK","/guides/connect/sdk","guides/04.connect/6.sdk","A JavaScript and TypeScript library that simplifies working with Directus.",{"title":377,"description":14,"icon":678,"links":14,"path":679,"stem":680,"children":681,"page":89},"directus-files","/guides/files","guides/05.files",[682,687,692,697,702],{"title":683,"path":684,"stem":685,"description":686,"icon":14,"links":14},"Upload Files","/guides/files/upload","guides/05.files/1.upload","Learn to upload files to Directus via both the data studio or API.",{"title":688,"path":689,"stem":690,"description":691,"icon":14,"links":14},"Download Files","/guides/files/download","guides/05.files/2.download","Learn to download content from the File Library",{"title":693,"path":694,"stem":695,"description":696,"icon":14,"links":14},"Manage Files","/guides/files/manage","guides/05.files/3.manage","Learn to view, modify, edit and set files' focal points.",{"title":698,"path":699,"stem":700,"description":701,"icon":14,"links":14},"Access Files","/guides/files/access","guides/05.files/4.access","Learn how to access uploaded files, authenticate, provide optional filenames and directly download them.",{"title":703,"path":704,"stem":705,"description":706,"icon":14,"links":14},"Transform Files","/guides/files/transform","guides/05.files/5.transform","Learn how to transform files and set custom presets for these transformations.",{"title":708,"description":14,"icon":709,"links":14,"path":710,"stem":711,"children":712,"page":89},"Automate","directus-automate","/guides/automate","guides/06.automate",[713,717,722,727],{"title":382,"path":714,"stem":715,"description":716,"icon":14,"links":14},"/guides/automate/flows","guides/06.automate/1.flows","Flows enable custom, event-driven data processing and task automation within Directus.",{"title":718,"path":719,"stem":720,"description":721,"icon":14,"links":14},"Data Chain","/guides/automate/data-chain","guides/06.automate/2.data-chain","Data chains are created by each flow and hold information that can be accessed within different operations.",{"title":723,"path":724,"stem":725,"description":726,"icon":14,"links":14},"Triggers","/guides/automate/triggers","guides/06.automate/3.triggers","Triggers define the action or events that start flows.",{"title":728,"path":729,"stem":730,"description":731,"icon":14,"links":14},"Operations","/guides/automate/operations","guides/06.automate/4.operations","Operations are individual customizable actions in a flow.",{"title":86,"description":14,"icon":733,"links":14,"path":734,"stem":735,"children":736,"page":89},"directus-realtime","/guides/realtime","guides/07.realtime",[737,741,746,751],{"title":16,"path":738,"stem":739,"description":740,"icon":14,"links":14},"/guides/realtime/authentication","guides/07.realtime/1.authentication","Learn to implement the three authentication modes.",{"title":742,"path":743,"stem":744,"description":745,"icon":14,"links":14},"Subscriptions","/guides/realtime/subscriptions","guides/07.realtime/2.subscriptions","Learn to manage realtime subscriptions with both websockets and GraphQL.",{"title":747,"path":748,"stem":749,"description":750,"icon":14,"links":14},"Actions","/guides/realtime/actions","guides/07.realtime/3.actions","Learn to execute CRUD actions via websockets.",{"title":752,"path":753,"stem":754,"description":755,"icon":14,"links":14},"Custom WebSocket Handlers","/guides/realtime/custom-handlers","guides/07.realtime/4.custom-handlers","Build custom WebSocket message handlers, push messages to connected clients, and react to WebSocket events using hook extensions.",{"title":757,"description":14,"icon":758,"links":14,"path":759,"stem":760,"children":761,"page":89},"Insights","directus-insights","/guides/insights","guides/08.insights",[762,766],{"title":230,"path":763,"stem":764,"description":765,"icon":14,"links":14},"/guides/insights/overview","guides/08.insights/1.overview","Insights is a module in Directus that allows rapid, no-code build-out of analytics dashboards.",{"title":767,"path":768,"stem":769,"description":770,"icon":14,"links":14},"Panels","/guides/insights/panels","guides/08.insights/2.panels","Panels are the building-blocks you can add onto insights dashboards to create, save and display data analytics.",{"title":372,"description":14,"icon":772,"links":14,"path":773,"stem":774,"children":775,"page":89},"directus-marketplace","/guides/extensions","guides/09.extensions",[776,780,785,817,864,869,881],{"title":230,"path":777,"stem":778,"description":779,"icon":14,"links":14},"/guides/extensions/overview","guides/09.extensions/0.overview","Extensions are used to extend the functionality of Directus.",{"title":781,"path":782,"stem":783,"description":784,"icon":14,"links":14},"Quickstart","/guides/extensions/quickstart","guides/09.extensions/1.quickstart","This guide will cover how to get started with developing an extension for Directus.",{"title":786,"path":787,"stem":788,"children":789,"description":791,"icon":14,"links":14},"API Extensions","/guides/extensions/api-extensions","guides/09.extensions/2.api-extensions/0.index",[790,792,797,802,807,812],{"title":786,"path":787,"stem":788,"description":791,"icon":14,"links":14},"API Extensions extend the functionality of the API.",{"title":793,"path":794,"stem":795,"description":796,"icon":14,"links":14},"Event Hooks","/guides/extensions/api-extensions/hooks","guides/09.extensions/2.api-extensions/1.hooks","Hooks allow running code when during the Directus lifecycle or database events.",{"title":798,"path":799,"stem":800,"description":801,"icon":14,"links":14},"API Endpoints","/guides/extensions/api-extensions/endpoints","guides/09.extensions/2.api-extensions/2.endpoints","Endpoints allow you to register new API routes in your Directus project.",{"title":803,"path":804,"stem":805,"description":806,"icon":14,"links":14},"Flow Operations","/guides/extensions/api-extensions/operations","guides/09.extensions/2.api-extensions/3.operations","Operations are single steps in a Flow - the no-code automation tool part of Directus Automate.",{"title":808,"path":809,"stem":810,"description":811,"icon":14,"links":14},"Services","/guides/extensions/api-extensions/services","guides/09.extensions/2.api-extensions/4.services","When building extensions, you may use internal Directus services directly.",{"title":813,"path":814,"stem":815,"description":816,"icon":14,"links":14},"Sandbox","/guides/extensions/api-extensions/sandbox","guides/09.extensions/2.api-extensions/5.sandbox","Sandboxed Extensions run in an isolated environment and must request permission scopes.",{"title":818,"path":819,"stem":820,"children":821,"description":823,"icon":14,"links":14},"App Extensions","/guides/extensions/app-extensions","guides/09.extensions/3.app-extensions/0.index",[822,824,829,834,839,844,849,854,859],{"title":818,"path":819,"stem":820,"description":823,"icon":14,"links":14},"App Extensions extend the functionality of the Data Studio.",{"title":825,"path":826,"stem":827,"description":828,"icon":14,"links":14},"Editor Interfaces","/guides/extensions/app-extensions/interfaces","guides/09.extensions/3.app-extensions/1.interfaces","Interfaces are form inputs used primarily inside of the Directus Editor.",{"title":830,"path":831,"stem":832,"description":833,"icon":14,"links":14},"Inline Displays","/guides/extensions/app-extensions/displays","guides/09.extensions/3.app-extensions/2.displays","Displays are used to display a single value throughout the Data Studio.",{"title":835,"path":836,"stem":837,"description":838,"icon":14,"links":14},"Explore Layouts","/guides/extensions/app-extensions/layouts","guides/09.extensions/3.app-extensions/3.layouts","Layouts are used to display a list of items in Explore pages in different ways.",{"title":840,"path":841,"stem":842,"description":843,"icon":14,"links":14},"Dashboard Panels","/guides/extensions/app-extensions/panels","guides/09.extensions/3.app-extensions/4.panels","Panels are customizable components within Directus Insights dashboards.",{"title":845,"path":846,"stem":847,"description":848,"icon":14,"links":14},"Custom Modules","/guides/extensions/app-extensions/modules","guides/09.extensions/3.app-extensions/5.modules","Modules are top-level areas of the Data Studio, navigated to from the left-hand module bar.",{"title":850,"path":851,"stem":852,"description":853,"icon":14,"links":14},"Custom Themes","/guides/extensions/app-extensions/themes","guides/09.extensions/3.app-extensions/6.themes","Themes are used to style elements of the Data Studio including colors and fonts.",{"title":855,"path":856,"stem":857,"description":858,"icon":14,"links":14},"UI Library","/guides/extensions/app-extensions/ui-library","guides/09.extensions/3.app-extensions/7.ui-library","Directus offers globally-registered UI components for building extensions.",{"title":860,"path":861,"stem":862,"description":863,"icon":14,"links":14},"Composables","/guides/extensions/app-extensions/composables","guides/09.extensions/3.app-extensions/8.composables","Vue composables for working with Directus services when building extensions.",{"title":865,"path":866,"stem":867,"description":868,"icon":14,"links":14},"Bundling Extensions","/guides/extensions/bundles","guides/09.extensions/4.bundles","Bundles are a way to group extensions together as a single distributable package.",{"title":870,"path":871,"stem":872,"children":873,"description":875,"icon":14,"links":14},"Marketplace Beta","/guides/extensions/marketplace","guides/09.extensions/5.marketplace/0.index",[874,876],{"title":870,"path":871,"stem":872,"description":875,"icon":14,"links":14},"The Directus Marketplace provides a way for users to install extensions in their projects directly the Data Studio.",{"title":877,"path":878,"stem":879,"description":880,"icon":14,"links":14},"Publishing Extensions","/guides/extensions/marketplace/publishing","guides/09.extensions/5.marketplace/1.publishing","Publish extensions to the Directus Marketplace via npm, including required metadata, best practices, and author profile setup.",{"title":882,"path":883,"stem":884,"description":885,"icon":14,"links":14},"CLI","/guides/extensions/cli","guides/09.extensions/6.cli","Using the create-directus-extension to build, validate and manage extensions.",{"title":887,"path":888,"stem":889,"children":890,"description":14,"icon":898,"links":14},"Deployments","/guides/deployments","guides/10.deployments/0.index",[891,893],{"title":230,"path":888,"stem":889,"description":892,"icon":14,"links":14},"Trigger, monitor, and manage frontend deployments directly from Directus.",{"title":894,"path":895,"stem":896,"description":897,"icon":14,"links":14},"Security","/guides/deployments/security","guides/10.deployments/1.security","Access control, permissions, and credential protection for the Deployment module.","directus-deployments",{"title":347,"path":900,"stem":901,"children":902,"description":14,"icon":987,"links":14},"/guides/ai","guides/11.ai/0.index",[903,906,937],{"title":904,"path":900,"stem":901,"description":905,"icon":14,"links":14},"AI + Directus","Use AI to interact with Directus - either through the built-in AI Assistant or by connecting external AI tools via MCP.",{"title":907,"path":908,"stem":909,"children":910,"description":14,"icon":14,"links":14},"AI Assistant","/guides/ai/assistant","guides/11.ai/1.assistant/0.index",[911,913,918,923,928,933],{"title":230,"path":908,"stem":909,"description":912,"icon":14,"links":14},"Chat with an AI assistant directly inside Directus. Create content, manage your schema, trigger automations, and explore your data through natural conversation.",{"title":914,"path":915,"stem":916,"description":917,"icon":14,"links":14},"Setup","/guides/ai/assistant/setup","guides/11.ai/1.assistant/1.setup","Configure AI Assistant by adding your AI provider API keys and customizing assistant behavior.",{"title":919,"path":920,"stem":921,"description":922,"icon":14,"links":14},"Usage","/guides/ai/assistant/usage","guides/11.ai/1.assistant/2.usage","Learn how to use AI Assistant to interact with your Directus instance through natural conversation.",{"title":924,"path":925,"stem":926,"description":927,"icon":14,"links":14},"Tools","/guides/ai/assistant/tools","guides/11.ai/1.assistant/3.tools","Reference of all tools available to AI Assistant for interacting with your Directus instance.",{"title":929,"path":930,"stem":931,"description":932,"icon":14,"links":14},"Best Practices","/guides/ai/assistant/tips","guides/11.ai/1.assistant/4.tips","Get the most out of AI Assistant with practical tips, example prompts, and common pitfalls to avoid.",{"title":894,"path":934,"stem":935,"description":936,"icon":14,"links":14},"/guides/ai/assistant/security","guides/11.ai/1.assistant/5.security","Security considerations for using AI Assistant safely with your Directus data.",{"title":938,"path":939,"stem":940,"children":941,"description":14,"icon":14,"links":14},"MCP Server","/guides/ai/mcp","guides/11.ai/2.mcp/0.index",[942,944,949,954,958,963,968,972],{"title":230,"path":939,"stem":940,"description":943,"icon":14,"links":14},"Connect AI assistants directly to your Directus instance. Let Claude, ChatGPT, and other AI tools manage your content without manual copy-pasting.",{"title":945,"path":946,"stem":947,"description":948,"icon":14,"links":14},"Installation","/guides/ai/mcp/installation","guides/11.ai/2.mcp/1.installation","Set up the Directus MCP server and connect your AI tools in under 5 minutes.",{"title":950,"path":951,"stem":952,"description":953,"icon":14,"links":14},"Use Cases","/guides/ai/mcp/use-cases","guides/11.ai/2.mcp/2.use-cases","Real examples of how to use AI with your Directus content to save time and reduce repetitive work.",{"title":924,"path":955,"stem":956,"description":957,"icon":14,"links":14},"/guides/ai/mcp/tools","guides/11.ai/2.mcp/3.tools","Learn about the tools available in the Directus remote MCP server and how they enable AI-powered content management.",{"title":959,"path":960,"stem":961,"description":962,"icon":14,"links":14},"Prompts","/guides/ai/mcp/prompts","guides/11.ai/2.mcp/4.prompts","Learn how to configure and use stored prompts with the Directus MCP Server.",{"title":964,"path":965,"stem":966,"description":967,"icon":14,"links":14},"Troubleshooting","/guides/ai/mcp/troubleshooting","guides/11.ai/2.mcp/5.troubleshooting","Common issues and solutions when setting up and using the Directus MCP server.",{"title":894,"path":969,"stem":970,"description":971,"icon":14,"links":14},"/guides/ai/mcp/security","guides/11.ai/2.mcp/6.security","Practical security guidelines for using the Directus MCP server safely and protecting your data.",{"title":973,"path":974,"stem":975,"children":976,"description":14,"icon":14,"links":14},"Local MCP","/guides/ai/mcp/local-mcp","guides/11.ai/2.mcp/7.local-mcp/0.index",[977,979,983],{"title":945,"path":974,"stem":975,"description":978,"icon":14,"links":14},"The Directus Content MCP Server allows you to interact with your Directus data through AI tools using the Model Context Protocol.",{"title":924,"path":980,"stem":981,"description":982,"icon":14,"links":14},"/guides/ai/mcp/local-mcp/tools","guides/11.ai/2.mcp/7.local-mcp/1.tools","Learn about the tools available in the local Directus Content MCP Server and how to configure them.",{"title":959,"path":984,"stem":985,"description":986,"icon":14,"links":14},"/guides/ai/mcp/local-mcp/prompts","guides/11.ai/2.mcp/7.local-mcp/2.prompts","Configure stored prompts with the local MCP server using environment variables and manual collection setup.","directus-ai",{"title":989,"description":14,"icon":990,"links":14,"path":991,"stem":992,"children":993},"Integrations","directus-integrations","/guides/integrations","guides/12.integrations/index",[994,996,1003,1024,1046,1065,1076],{"title":989,"path":991,"stem":992,"description":995,"icon":14,"links":14},"Connect Directus with third-party tools and services to extend functionality and automate workflows.",{"title":997,"path":998,"stem":999,"children":1000,"description":14,"icon":14,"links":14},"Framer","/guides/integrations/framer","guides/11.integrations/6.framer/0.index",[1001],{"title":997,"path":998,"stem":999,"description":1002,"icon":14,"links":14},"Connect your Directus collections to Framer's CMS to sync content in both directions using the Directus Framer plugin.",{"title":1004,"path":1005,"stem":1006,"children":1007,"description":14,"icon":14,"links":14},"n8n","/guides/integrations/n8n","guides/12.integrations/1.n8n/0.index",[1008,1011,1015,1020],{"title":1009,"path":1005,"stem":1006,"description":1010,"icon":14,"links":14},"Integration","Connect Directus with n8n to automate workflows, sync data, and integrate your CMS with other services using the Directus community node.",{"title":747,"path":1012,"stem":1013,"description":1014,"icon":14,"links":14},"/guides/integrations/n8n/directus-n8n-actions","guides/12.integrations/1.n8n/directus-n8n-actions","Complete guide for using Directus actions in n8n workflows, including working with items, users, and files.",{"title":1016,"path":1017,"stem":1018,"description":1019,"icon":14,"links":14},"Advanced","/guides/integrations/n8n/directus-n8n-advanced","guides/12.integrations/1.n8n/directus-n8n-advanced","Advanced guide for using Directus raw CRUD operations in n8n, including raw JSON operations, complex filters, relational queries, and query parameters.",{"title":723,"path":1021,"stem":1022,"description":1023,"icon":14,"links":14},"/guides/integrations/n8n/directus-n8n-triggers","guides/12.integrations/1.n8n/directus-n8n-triggers","Complete guide for using Directus triggers in n8n workflows to automate workflows when events happen in Directus.",{"title":1025,"path":1026,"stem":1027,"children":1028,"description":14,"icon":14,"links":14},"Clay","/guides/integrations/clay","guides/12.integrations/2.clay/0.index",[1029,1031,1036,1041],{"title":1009,"path":1026,"stem":1027,"description":1030,"icon":14,"links":14},"Connect Directus with Clay to automate data enrichment and sync content between platforms using webhooks and HTTP API templates.",{"title":1032,"path":1033,"stem":1034,"description":1035,"icon":14,"links":14},"Data Operations","/guides/integrations/clay/directus-clay-data-operations","guides/12.integrations/2.clay/directus-clay-data-operations","Advanced techniques for working with Directus data in Clay, including filters, pagination, common use cases, and best practices.",{"title":1037,"path":1038,"stem":1039,"description":1040,"icon":14,"links":14},"Templates","/guides/integrations/clay/use-clay-templates-with-directus","guides/12.integrations/2.clay/use-clay-templates-with-directus","Learn how to use Clay's pre-built HTTP API templates to connect with Directus for data enrichment and synchronization.",{"title":1042,"path":1043,"stem":1044,"description":1045,"icon":14,"links":14},"Webhooks","/guides/integrations/clay/use-directus-webhooks-with-clay","guides/12.integrations/2.clay/use-directus-webhooks-with-clay","Learn how to set up Directus Flows to automatically send data to Clay webhooks for real-time data synchronization.",{"title":1047,"path":1048,"stem":1049,"children":1050,"description":14,"icon":14,"links":14},"Zapier","/guides/integrations/zapier","guides/12.integrations/3.zapier/0.index",[1051,1053,1057,1061],{"title":1009,"path":1048,"stem":1049,"description":1052,"icon":14,"links":14},"Connect Directus with Zapier to automate workflows, sync data, and integrate your CMS with thousands of other apps using the Directus Zapier integration.",{"title":747,"path":1054,"stem":1055,"description":1056,"icon":14,"links":14},"/guides/integrations/zapier/actions","guides/12.integrations/3.zapier/actions","Complete guide for using Directus actions in Zapier workflows, including working with items, users, and files.",{"title":1016,"path":1058,"stem":1059,"description":1060,"icon":14,"links":14},"/guides/integrations/zapier/advanced","guides/12.integrations/3.zapier/advanced","Advanced guide for using Directus API features in Zapier, including raw request actions, advanced filtering, and custom API calls.",{"title":723,"path":1062,"stem":1063,"description":1064,"icon":14,"links":14},"/guides/integrations/zapier/triggers","guides/12.integrations/3.zapier/triggers","Complete guide for using Directus triggers in Zapier workflows to automatically start Zaps when events happen in Directus.",{"title":1066,"path":1067,"stem":1068,"children":1069,"description":14,"icon":14,"links":14},"Vercel","/guides/integrations/vercel","guides/12.integrations/4.vercel/0.index",[1070,1072],{"title":1066,"path":1067,"stem":1068,"description":1071,"icon":14,"links":14},"Connect Directus with Vercel to trigger deployments, monitor build status, and manage your frontend projects directly from your Directus instance.",{"title":887,"path":1073,"stem":1074,"description":1075,"icon":14,"links":14},"/guides/integrations/vercel/deployments","guides/12.integrations/4.vercel/deployments","Complete guide for triggering deployments, monitoring build status, and viewing logs for your Vercel projects from Directus.",{"title":1077,"path":1078,"stem":1079,"children":1080,"description":14,"icon":14,"links":14},"Netlify","/guides/integrations/netlify","guides/12.integrations/5.netlify/0.index",[1081,1083],{"title":1077,"path":1078,"stem":1079,"description":1082,"icon":14,"links":14},"Integrate Directus with Netlify to deploy your sites, track build progress, and manage frontend projects from within your Directus instance.",{"title":887,"path":1084,"stem":1085,"description":1086,"icon":14,"links":14},"/guides/integrations/netlify/deployments","guides/12.integrations/5.netlify/deployments","Full guide for triggering builds, tracking deployment progress, and viewing logs for your Netlify sites from Directus.",{"title":230,"path":1088,"stem":1089,"children":1090,"description":1092,"icon":14,"links":14},"/releases","releases/1.index",[1091,1093,1098],{"title":230,"path":1088,"stem":1089,"description":1092,"icon":14,"links":14},"Releases are how we roll out new features, updates, and fixes to Directus.",{"title":1094,"path":1095,"stem":1096,"description":1097,"icon":14,"links":14},"Changelog","/releases/changelog","releases/2.changelog","A monthly summary of what's new from the Directus team.",{"title":1099,"path":1100,"stem":1101,"children":1102,"description":1104,"icon":14,"links":14},"Breaking Changes","/releases/breaking-changes","releases/3.breaking-changes/0.index",[1103,1105,1109],{"title":1099,"path":1100,"stem":1101,"description":1104,"icon":14,"links":14},"Breaking changes may require action on your part before upgrading.",{"title":1106,"path":1107,"stem":1108,"description":1104,"icon":14,"links":14},"Version 10","/releases/breaking-changes/version-10","releases/3.breaking-changes/1.version-10",{"title":1110,"path":1111,"stem":1112,"description":1104,"icon":14,"links":14},"Version 11","/releases/breaking-changes/version-11","releases/3.breaking-changes/2.version-11",{"title":1114,"description":14,"icon":14,"links":14,"path":1115,"stem":1116,"children":1117,"page":89},"Self-Hosting","/self-hosting","self-hosting",[1118,1122,1127,1132,1137],{"title":230,"path":1119,"stem":1120,"description":1121,"icon":14,"links":14},"/self-hosting/overview","self-hosting/1.overview","Self-hosting Directus means running the Directus software on your own infrastructure.",{"title":1123,"path":1124,"stem":1125,"description":1126,"icon":14,"links":14},"Requirements","/self-hosting/requirements","self-hosting/2.requirements","This page outlines the requirements for self-hosting Directus.",{"title":1128,"path":1129,"stem":1130,"description":1131,"icon":14,"links":14},"Deployment","/self-hosting/deploying","self-hosting/3.deploying","This section covers the deployment process of Directus, including environment variables, versioning, persistence, and initial admin user setup.",{"title":1133,"path":1134,"stem":1135,"description":1136,"icon":14,"links":14},"Upgrading","/self-hosting/upgrading","self-hosting/4.upgrading","Learn how to upgrade Directus to the latest version.",{"title":1138,"path":1139,"stem":1140,"description":1141,"icon":14,"links":14},"Including Extensions","/self-hosting/including-extensions","self-hosting/5.including-extensions","Learn how to include extensions in your self-hosted Directus project.",{"title":1143,"path":1144,"stem":1145,"children":1146},"Tutorials","/tutorials","tutorials",[1147,1150,1370,1530,1576,1602,1719,1749],{"title":1143,"path":1144,"stem":1148,"description":1149,"icon":14,"links":14},"tutorials/index","This is a collection of step-by-step guides and practical examples to help you get the most out of our platform. Whether you're a beginner or an experienced user, our tutorials are designed to provide you with the knowledge and skills you need to succeed.",{"title":125,"path":1151,"stem":1152,"children":1153,"description":24,"icon":14,"links":14},"/tutorials/getting-started","tutorials/1.getting-started/index",[1154,1155,1160,1165,1170,1175,1180,1185,1190,1195,1200,1205,1210,1215,1220,1225,1230,1235,1240,1245,1250,1255,1260,1265,1270,1275,1280,1285,1290,1295,1300,1305,1310,1315,1320,1325,1330,1335,1340,1345,1350,1355,1360,1365],{"title":125,"path":1151,"stem":1152,"description":24,"icon":14,"links":14},{"title":1156,"path":1157,"stem":1158,"description":1159,"icon":14,"links":14},"Create Reusable Blocks with Many-to-Any Relationships","/tutorials/getting-started/create-reusable-blocks-with-many-to-any-relationships","tutorials/1.getting-started/create-reusable-blocks-with-many-to-any-relationships","Learn how to data model for multiple, repeating sections of content.",{"title":1161,"path":1162,"stem":1163,"description":1164,"icon":14,"links":14},"Fetch Data from Directus in Android with Kotlin","/tutorials/getting-started/fetch-data-from-directus-in-android-with-kotlin","tutorials/1.getting-started/fetch-data-from-directus-in-android-with-kotlin","Learn how to integrate Directus in your Android app with Kotlin.",{"title":1166,"path":1167,"stem":1168,"description":1169,"icon":14,"links":14},"Fetch Data from Directus in iOS with Swift","/tutorials/getting-started/fetch-data-from-directus-in-ios-with-swift","tutorials/1.getting-started/fetch-data-from-directus-in-ios-with-swift","Learn how to integrate Directus in your iOS app with Swift.",{"title":1171,"path":1172,"stem":1173,"description":1174,"icon":14,"links":14},"Fetch Data from Directus with Angular","/tutorials/getting-started/fetch-data-from-directus-with-angular","tutorials/1.getting-started/fetch-data-from-directus-with-angular","Learn how to integrate Directus in your Angular web application.",{"title":1176,"path":1177,"stem":1178,"description":1179,"icon":14,"links":14},"Fetch Data from Directus with Astro","/tutorials/getting-started/fetch-data-from-directus-with-astro","tutorials/1.getting-started/fetch-data-from-directus-with-astro","Learn how to integrate Directus in your Astro web application.",{"title":1181,"path":1182,"stem":1183,"description":1184,"icon":14,"links":14},"Fetch Data from Directus with Django","/tutorials/getting-started/fetch-data-from-directus-with-django","tutorials/1.getting-started/fetch-data-from-directus-with-django","Learn how to integrate Directus in your Django web application.",{"title":1186,"path":1187,"stem":1188,"description":1189,"icon":14,"links":14},"Fetch Data from Directus with Eleventy 3","/tutorials/getting-started/fetch-data-from-directus-with-eleventy-3","tutorials/1.getting-started/fetch-data-from-directus-with-eleventy-3","Learn how to integrate Directus in your 11ty web application.",{"title":1191,"path":1192,"stem":1193,"description":1194,"icon":14,"links":14},"Fetch Data from Directus with Flask","/tutorials/getting-started/fetch-data-from-directus-with-flask","tutorials/1.getting-started/fetch-data-from-directus-with-flask","Learn how to integrate Directus in your Flask web application.",{"title":1196,"path":1197,"stem":1198,"description":1199,"icon":14,"links":14},"Fetch Data from Directus with Flutter","/tutorials/getting-started/fetch-data-from-directus-with-flutter","tutorials/1.getting-started/fetch-data-from-directus-with-flutter","Learn how to integrate Directus in your Flutter app with Dart.",{"title":1201,"path":1202,"stem":1203,"description":1204,"icon":14,"links":14},"Fetch Data from Directus with Laravel","/tutorials/getting-started/fetch-data-from-directus-with-laravel","tutorials/1.getting-started/fetch-data-from-directus-with-laravel","Learn how to integrate Directus in your Laravel web application.",{"title":1206,"path":1207,"stem":1208,"description":1209,"icon":14,"links":14},"Fetch Data from Directus with Next.js","/tutorials/getting-started/fetch-data-from-directus-with-nextjs","tutorials/1.getting-started/fetch-data-from-directus-with-nextjs","Learn how to integrate Directus in your Next.js web application.",{"title":1211,"path":1212,"stem":1213,"description":1214,"icon":14,"links":14},"Fetch Data from Directus with Nuxt","/tutorials/getting-started/fetch-data-from-directus-with-nuxt","tutorials/1.getting-started/fetch-data-from-directus-with-nuxt","Learn how to integrate Directus in your Nuxt web application.",{"title":1216,"path":1217,"stem":1218,"description":1219,"icon":14,"links":14},"Fetch Data from Directus with SolidStart","/tutorials/getting-started/fetch-data-from-directus-with-solidstart","tutorials/1.getting-started/fetch-data-from-directus-with-solidstart","Learn how to integrate Directus in your SolidStart web application.",{"title":1221,"path":1222,"stem":1223,"description":1224,"icon":14,"links":14},"Fetch Data from Directus with Spring Boot","/tutorials/getting-started/fetch-data-from-directus-with-spring-boot","tutorials/1.getting-started/fetch-data-from-directus-with-spring-boot","Learn how to integrate Directus in your Spring Boot web application.",{"title":1226,"path":1227,"stem":1228,"description":1229,"icon":14,"links":14},"Fetch Data from Directus with SvelteKit","/tutorials/getting-started/fetch-data-from-directus-with-sveltekit","tutorials/1.getting-started/fetch-data-from-directus-with-sveltekit","Learn how to integrate Directus in your SvelteKit web application.",{"title":1231,"path":1232,"stem":1233,"description":1234,"icon":14,"links":14},"Implement Directus Auth with iOS","/tutorials/getting-started/implement-directus-auth-with-ios","tutorials/1.getting-started/implement-directus-auth-with-ios","Learn how to register, login, and protect content in your iOS app.",{"title":1236,"path":1237,"stem":1238,"description":1239,"icon":14,"links":14},"Implement Multilingual Content with Directus and SvelteKit","/tutorials/getting-started/implement-multilingual-content-with-directus-and-svelte-kit","tutorials/1.getting-started/implement-multilingual-content-with-directus-and-svelte-kit","Learn how to handle internationalization in your SvelteKit application.",{"title":1241,"path":1242,"stem":1243,"description":1244,"icon":14,"links":14},"Implementing Live Preview in Astro","/tutorials/getting-started/implementing-live-preview-in-astro","tutorials/1.getting-started/implementing-live-preview-in-astro","Learn how to setup Directus live preview with Astro.",{"title":1246,"path":1247,"stem":1248,"description":1249,"icon":14,"links":14},"Implementing Live Preview in Next.js","/tutorials/getting-started/implementing-live-preview-in-next-js","tutorials/1.getting-started/implementing-live-preview-in-next-js","Learn how to setup Directus live preview with Next.js.",{"title":1251,"path":1252,"stem":1253,"description":1254,"icon":14,"links":14},"Implementing Live Preview in Nuxt","/tutorials/getting-started/implementing-live-preview-in-nuxt","tutorials/1.getting-started/implementing-live-preview-in-nuxt","Learn how to setup Directus live preview with Nuxt.",{"title":1256,"path":1257,"stem":1258,"description":1259,"icon":14,"links":14},"Implementing Live Preview in React","/tutorials/getting-started/implementing-live-preview-in-react","tutorials/1.getting-started/implementing-live-preview-in-react","Learn how to setup Directus live preview with React.",{"title":1261,"path":1262,"stem":1263,"description":1264,"icon":14,"links":14},"Implementing Live Preview in SvelteKit","/tutorials/getting-started/implementing-live-preview-in-sveltekit","tutorials/1.getting-started/implementing-live-preview-in-sveltekit","Learn how to setup Directus live preview with SvelteKit.",{"title":1266,"path":1267,"stem":1268,"description":1269,"icon":14,"links":14},"Implementing Multilingual Content using Directus and Astro","/tutorials/getting-started/implementing-multilingual-content-using-directus-and-astro","tutorials/1.getting-started/implementing-multilingual-content-using-directus-and-astro","Learn how to access multilingual Directus content using Astro.",{"title":1271,"path":1272,"stem":1273,"description":1274,"icon":14,"links":14},"Implementing Multilingual Content using Directus and Next.js","/tutorials/getting-started/implementing-multilingual-content-using-directus-and-next","tutorials/1.getting-started/implementing-multilingual-content-using-directus-and-next","Learn how to access multilingual Directus content using Next.js.",{"title":1276,"path":1277,"stem":1278,"description":1279,"icon":14,"links":14},"Implementing Multilingual Content using Directus and Nuxt","/tutorials/getting-started/implementing-multilingual-content-using-directus-and-nuxt","tutorials/1.getting-started/implementing-multilingual-content-using-directus-and-nuxt","Learn how to access multilingual Directus content using Nuxt.",{"title":1281,"path":1282,"stem":1283,"description":1284,"icon":14,"links":14},"Implementing Multilingual Content using Directus and SvelteKit","/tutorials/getting-started/implementing-multilingual-content-using-directus-and-sveltekit","tutorials/1.getting-started/implementing-multilingual-content-using-directus-and-sveltekit","Learn how to access multilingual Directus content using SvelteKit.",{"title":1286,"path":1287,"stem":1288,"description":1289,"icon":14,"links":14},"Integrating the Directus Visual Editor with Next.js","/tutorials/getting-started/integrating-the-directus-visual-editor-with-nextjs","tutorials/1.getting-started/integrating-the-directus-visual-editor-with-nextjs","Learn how to integrate the Directus Visual Editor with Next.js.",{"title":1291,"path":1292,"stem":1293,"description":1294,"icon":14,"links":14},"Integrating the Directus Visual Editor with Nuxt","/tutorials/getting-started/integrating-the-directus-visual-editor-with-nuxt","tutorials/1.getting-started/integrating-the-directus-visual-editor-with-nuxt","Learn how to integrate the Directus Visual Editor with Nuxt.",{"title":1296,"path":1297,"stem":1298,"description":1299,"icon":14,"links":14},"Integrating the Directus Visual Editor with SvelteKit","/tutorials/getting-started/integrating-the-directus-visual-editor-with-sveltekit","tutorials/1.getting-started/integrating-the-directus-visual-editor-with-sveltekit","Learn how to integrate the Directus Visual Editor with SvelteKit.",{"title":1301,"path":1302,"stem":1303,"description":1304,"icon":14,"links":14},"Rendering Dynamic Blocks Using Astro","/tutorials/getting-started/rendering-dynamic-blocks-using-astro","tutorials/1.getting-started/rendering-dynamic-blocks-using-astro","Learn how to render dynamic blocks using Astro.",{"title":1306,"path":1307,"stem":1308,"description":1309,"icon":14,"links":14},"Rendering Dynamic Blocks Using Next.js","/tutorials/getting-started/rendering-dynamic-blocks-using-next","tutorials/1.getting-started/rendering-dynamic-blocks-using-next","Learn how to render dynamic blocks using Next.js.",{"title":1311,"path":1312,"stem":1313,"description":1314,"icon":14,"links":14},"Rendering Dynamic Blocks Using Nuxt","/tutorials/getting-started/rendering-dynamic-blocks-using-nuxt","tutorials/1.getting-started/rendering-dynamic-blocks-using-nuxt","Learn how to render dynamic blocks using Nuxt.",{"title":1316,"path":1317,"stem":1318,"description":1319,"icon":14,"links":14},"Rendering Dynamic Blocks Using SvelteKit","/tutorials/getting-started/rendering-dynamic-blocks-using-sveltekit","tutorials/1.getting-started/rendering-dynamic-blocks-using-sveltekit","Learn how to render dynamic blocks using SvelteKit.",{"title":1321,"path":1322,"stem":1323,"description":1324,"icon":14,"links":14},"Set Up Live Preview with Next.js","/tutorials/getting-started/set-up-live-preview-with-next-js","tutorials/1.getting-started/set-up-live-preview-with-next-js","Learn how to confgure Live Preview with Next.js' draft mode.",{"title":1326,"path":1327,"stem":1328,"description":1329,"icon":14,"links":14},"Set Up Live Preview with Nuxt","/tutorials/getting-started/set-up-live-preview-with-nuxt","tutorials/1.getting-started/set-up-live-preview-with-nuxt","Learn how to create a Nuxt preview plugin to configure Live Preview.",{"title":1331,"path":1332,"stem":1333,"description":1334,"icon":14,"links":14},"Submit Forms Using Directus and Next.js","/tutorials/getting-started/submit-forms-using-directus-and-nextjs","tutorials/1.getting-started/submit-forms-using-directus-and-nextjs","Learn how to submit forms using Directus and Next.js.",{"title":1336,"path":1337,"stem":1338,"description":1339,"icon":14,"links":14},"Submit Forms Using Directus and Nuxt","/tutorials/getting-started/submit-forms-using-directus-and-nuxt","tutorials/1.getting-started/submit-forms-using-directus-and-nuxt","Learn how to submit forms using Directus and Nuxt.",{"title":1341,"path":1342,"stem":1343,"description":1344,"icon":14,"links":14},"Submit Forms Using Directus and SvelteKit","/tutorials/getting-started/submit-forms-using-directus-and-sveltekit","tutorials/1.getting-started/submit-forms-using-directus-and-sveltekit","Learn how to submit forms using Directus and SvelteKit.",{"title":1346,"path":1347,"stem":1348,"description":1349,"icon":14,"links":14},"Using Authentication in Astro","/tutorials/getting-started/using-authentication-in-astro","tutorials/1.getting-started/using-authentication-in-astro","Learn how to setup Directus authentication with Astro.",{"title":1351,"path":1352,"stem":1353,"description":1354,"icon":14,"links":14},"Using Authentication in Next.js","/tutorials/getting-started/using-authentication-in-next-js","tutorials/1.getting-started/using-authentication-in-next-js","Learn how to setup Directus authentication with Next.js.",{"title":1356,"path":1357,"stem":1358,"description":1359,"icon":14,"links":14},"Using Authentication in Nuxt","/tutorials/getting-started/using-authentication-in-nuxt","tutorials/1.getting-started/using-authentication-in-nuxt","Learn how to setup Directus authentication with Nuxt.",{"title":1361,"path":1362,"stem":1363,"description":1364,"icon":14,"links":14},"Using Authentication in React","/tutorials/getting-started/using-authentication-in-react","tutorials/1.getting-started/using-authentication-in-react","Learn how to setup Directus authentication with React.",{"title":1366,"path":1367,"stem":1368,"description":1369,"icon":14,"links":14},"Using Authentication in SvelteKit","/tutorials/getting-started/using-authentication-in-sveltekit","tutorials/1.getting-started/using-authentication-in-sveltekit","Learn how to setup Directus authentication with SvelteKit.",{"title":145,"path":1371,"stem":1372,"children":1373,"description":24,"icon":14,"links":14},"/tutorials/projects","tutorials/2.projects/index",[1374,1375,1380,1385,1390,1395,1400,1405,1410,1415,1420,1425,1430,1435,1440,1445,1450,1455,1460,1465,1470,1475,1480,1485,1490,1495,1500,1505,1510,1515,1520,1525],{"title":145,"path":1371,"stem":1372,"description":24,"icon":14,"links":14},{"title":1376,"path":1377,"stem":1378,"description":1379,"icon":14,"links":14},"Build a Multi-User Chat with JavaScript and Directus Realtime","/tutorials/projects/build-a-multi-user-chat-with-javascript-and-directus-realtime","tutorials/2.projects/build-a-multi-user-chat-with-javascript-and-directus-realtime","Learn how to send and receive data over a realtime connection with JavaScript.",{"title":1381,"path":1382,"stem":1383,"description":1384,"icon":14,"links":14},"Build a Multi-User Chat with React and Directus Realtime","/tutorials/projects/build-a-multi-user-chat-with-react-and-directus-realtime","tutorials/2.projects/build-a-multi-user-chat-with-react-and-directus-realtime","Learn how to send and receive data over a realtime connection in React applications.",{"title":1386,"path":1387,"stem":1388,"description":1389,"icon":14,"links":14},"Build a Multi-User Chat with Vue.js and Directus Realtime","/tutorials/projects/build-a-multi-user-chat-with-vue-js-and-directus-realtime","tutorials/2.projects/build-a-multi-user-chat-with-vue-js-and-directus-realtime","Learn how to send and receive data over a realtime connection in a Vue.js application.",{"title":1391,"path":1392,"stem":1393,"description":1394,"icon":14,"links":14},"Build a Notebook Chrome Extension with Directus Auth","/tutorials/projects/build-a-notebook-chrome-extension-with-directus-auth","tutorials/2.projects/build-a-notebook-chrome-extension-with-directus-auth","Learn to build and integrate a Chrome Extension with Directus Auth.",{"title":1396,"path":1397,"stem":1398,"description":1399,"icon":14,"links":14},"Build a Realtime Chat App with Directus and Astro","/tutorials/projects/build-a-realtime-chat-app-using-directus-and-astro","tutorials/2.projects/build-a-realtime-chat-app-using-directus-and-astro","Learn how to setup Directus realtime with Astro.",{"title":1401,"path":1402,"stem":1403,"description":1404,"icon":14,"links":14},"Build a Realtime Chat App with Directus and Nuxt","/tutorials/projects/build-a-realtime-chat-app-using-directus-and-nuxt","tutorials/2.projects/build-a-realtime-chat-app-using-directus-and-nuxt","Learn how to setup Directus realtime with Nuxt.",{"title":1406,"path":1407,"stem":1408,"description":1409,"icon":14,"links":14},"Build a Realtime Chat App with Directus and Next.js","/tutorials/projects/build-a-realtime-chat-app-with-directus-and-next","tutorials/2.projects/build-a-realtime-chat-app-with-directus-and-next","Learn how to setup Directus realtime with Next.js.",{"title":1411,"path":1412,"stem":1413,"description":1414,"icon":14,"links":14},"Build a Realtime Chat App with Directus and SvelteKit","/tutorials/projects/build-a-realtime-chat-app-with-directus-and-sveltekit","tutorials/2.projects/build-a-realtime-chat-app-with-directus-and-sveltekit","Learn how to setup Directus realtime with SvelteKit.",{"title":1416,"path":1417,"stem":1418,"description":1419,"icon":14,"links":14},"Build a Testimonial Widget with SvelteKit and Directus","/tutorials/projects/build-a-testimonial-widget-with-sveltekit-and-directus","tutorials/2.projects/build-a-testimonial-widget-with-sveltekit-and-directus","Learn how to set up a testimonial widget using SvelteKit and Directus.",{"title":1421,"path":1422,"stem":1423,"description":1424,"icon":14,"links":14},"Build a User Feedback Widget with Vue.js","/tutorials/projects/build-a-user-feedback-widget-with-vue-js","tutorials/2.projects/build-a-user-feedback-widget-with-vue-js-","Learn how we built our docs feedback widget with Directus.",{"title":1426,"path":1427,"stem":1428,"description":1429,"icon":14,"links":14},"Build a Video Streaming App with SvelteKit and Directus","/tutorials/projects/build-a-video-streaming-app-with-sveltekit-and-directus","tutorials/2.projects/build-a-video-streaming-app-with-sveltekit-and-directus","Learn how to store and retrieve video metadata, and then build a streaming application.",{"title":1431,"path":1432,"stem":1433,"description":1434,"icon":14,"links":14},"Build an Ecommerce Platform with Next.js, Stripe, and Directus Automate","/tutorials/projects/build-an-ecommerce-platform-with-next-js-stripe-and-directus-automate","tutorials/2.projects/build-an-ecommerce-platform-with-next-js-stripe-and-directus-automate","Learn to integrate Stripe with Directus Automate to build an e-commerce website.",{"title":1436,"path":1437,"stem":1438,"description":1439,"icon":14,"links":14},"Build an Hotel Booking Platform with Next.js, Stripe, and Directus Automate","/tutorials/projects/build-an-hotel-booking-platform-with-next-js-stripe-and-directus-automate","tutorials/2.projects/build-an-hotel-booking-platform-with-next-js-stripe-and-directus-automate","Learn to build a hotel booking site with dynamic availability and payments via Stripe.",{"title":1441,"path":1442,"stem":1443,"description":1444,"icon":14,"links":14},"Build Directus Garden - A Passive Collaborative Event Booth Demo","/tutorials/projects/build-directus-garden-a-passive-collaborative-event-booth-demo","tutorials/2.projects/build-directus-garden-a-passive-collaborative-event-booth-demo","Learn how we built our engagement platform for live in-person events with P5.js.",{"title":1446,"path":1447,"stem":1448,"description":1449,"icon":14,"links":14},"Build Forms Dynamically using Directus and Astro","/tutorials/projects/build-forms-dynamically-using-directus-and-astro","tutorials/2.projects/build-forms-dynamically-using-directus-and-astro","Learn how to setup Directus fields with Astro.",{"title":1451,"path":1452,"stem":1453,"description":1454,"icon":14,"links":14},"Build Forms Dynamically using Directus and Next.js","/tutorials/projects/build-forms-dynamically-using-directus-and-next","tutorials/2.projects/build-forms-dynamically-using-directus-and-next","Learn how to setup Directus fields with Next.js.",{"title":1456,"path":1457,"stem":1458,"description":1459,"icon":14,"links":14},"Build Forms Dynamically using Directus and Nuxt","/tutorials/projects/build-forms-dynamically-using-directus-and-nuxt","tutorials/2.projects/build-forms-dynamically-using-directus-and-nuxt","Learn how to setup Directus fields with Nuxt.",{"title":1461,"path":1462,"stem":1463,"description":1464,"icon":14,"links":14},"Build Forms Dynamically using Directus and SvelteKit","/tutorials/projects/build-forms-dynamically-using-directus-and-sveltekit","tutorials/2.projects/build-forms-dynamically-using-directus-and-sveltekit","Learn how to setup Directus fields with SvelteKit.",{"title":1466,"path":1467,"stem":1468,"description":1469,"icon":14,"links":14},"Build the Leap Week Registration and Referral System","/tutorials/projects/build-the-leap-week-registration-and-referral-system","tutorials/2.projects/build-the-leap-week-registration-and-referral-system-","Learn how we built our referral-based ticketing and raffle system with AI-generated rabbitars.",{"title":1471,"path":1472,"stem":1473,"description":1474,"icon":14,"links":14},"Building AIVenture - An AI-Powered Game with Directus","/tutorials/projects/building-ai-venture-an-ai-powered-game-with-directus","tutorials/2.projects/building-ai-venture-an-ai-powered-game-with-directus","Learn the advanced techniques used with Directus Automate to build a game.",{"title":1476,"path":1477,"stem":1478,"description":1479,"icon":14,"links":14},"Create a CMS using Directus and Astro","/tutorials/projects/create-a-cms-using-directus-and-astro","tutorials/2.projects/create-a-cms-using-directus-and-astro","Learn how to create a CMS using Directus and Astro.",{"title":1481,"path":1482,"stem":1483,"description":1484,"icon":14,"links":14},"Create a CMS using Directus and Next.js","/tutorials/projects/create-a-cms-using-directus-and-nextjs","tutorials/2.projects/create-a-cms-using-directus-and-nextjs","Learn how to create a CMS using Directus and Next.js.",{"title":1486,"path":1487,"stem":1488,"description":1489,"icon":14,"links":14},"Create a CMS using Directus and Nuxt","/tutorials/projects/create-a-cms-using-directus-and-nuxt","tutorials/2.projects/create-a-cms-using-directus-and-nuxt","Learn how to create a CMS using Directus and Nuxt.",{"title":1491,"path":1492,"stem":1493,"description":1494,"icon":14,"links":14},"Create a CMS using Directus and SvelteKit","/tutorials/projects/create-a-cms-using-directus-and-sveltekit","tutorials/2.projects/create-a-cms-using-directus-and-sveltekit","Learn how to create a CMS using Directus and SvelteKit.",{"title":1496,"path":1497,"stem":1498,"description":1499,"icon":14,"links":14},"Create Dynamic Pages for a CMS using Directus and Astro","/tutorials/projects/create-dynamic-pages-for-a-cms-using-directus-and-astro","tutorials/2.projects/create-dynamic-pages-for-a-cms-using-directus-and-astro","Learn how to create dynamic pages you can use in your CMS using Directus and Astro.",{"title":1501,"path":1502,"stem":1503,"description":1504,"icon":14,"links":14},"Create Dynamic Pages for a CMS using Directus and Next.js","/tutorials/projects/create-dynamic-pages-for-a-cms-using-directus-and-nextjs","tutorials/2.projects/create-dynamic-pages-for-a-cms-using-directus-and-nextjs","Learn how to create dynamic pages you can use in your CMS using Directus and Next.js.",{"title":1506,"path":1507,"stem":1508,"description":1509,"icon":14,"links":14},"Create Dynamic Pages for a CMS using Directus and Nuxt","/tutorials/projects/create-dynamic-pages-for-a-cms-using-directus-and-nuxt","tutorials/2.projects/create-dynamic-pages-for-a-cms-using-directus-and-nuxt","Learn how to create dynamic pages you can use in your CMS using Directus and Nuxt.",{"title":1511,"path":1512,"stem":1513,"description":1514,"icon":14,"links":14},"Create Dynamic Pages for a CMS using Directus and SvelteKit","/tutorials/projects/create-dynamic-pages-for-a-cms-using-directus-and-sveltekit","tutorials/2.projects/create-dynamic-pages-for-a-cms-using-directus-and-sveltekit","Learn how to create dynamic pages you can use in your CMS using Directus and SvelteKit.",{"title":1516,"path":1517,"stem":1518,"description":1519,"icon":14,"links":14},"How I Built an AI Open Source Santa Roast App with Directus and Nuxt","/tutorials/projects/how-i-built-an-ai-open-source-santa-roast-app-with-directus-and-nuxt","tutorials/2.projects/how-i-built-an-ai-open-source-santa-roast-app-with-directus-and-nuxt","Bryant breaks down how he built an AI-powered app that roasts developers based on their GitHub contributions.",{"title":1521,"path":1522,"stem":1523,"description":1524,"icon":14,"links":14},"Integrate Directus with ESP32 Hardware Sensors","/tutorials/projects/integrate-directus-with-esp-32-hardware-sensors","tutorials/2.projects/integrate-directus-with-esp-32-hardware-sensors","Learn how to integrate Directus with IoT systems by reading and publishing sensor data.",{"title":1526,"path":1527,"stem":1528,"description":1529,"icon":14,"links":14},"Use Directus as a Baby Health Tracker with Owlet and OpsGenie","/tutorials/projects/use-directus-as-a-baby-health-tracker-with-owlet-and-ops-genie","tutorials/2.projects/use-directus-as-a-baby-health-tracker-with-owlet-and-ops-genie","Learn how to integrate Directus with hardware sensors and incident repsonse systems.",{"title":1531,"path":1532,"stem":1533,"children":1534,"description":24,"icon":14,"links":14},"Tips & Tricks","/tutorials/tips-and-tricks","tutorials/3.tips-and-tricks/index",[1535,1536,1541,1546,1551,1556,1561,1566,1571],{"title":1531,"path":1532,"stem":1533,"description":24,"icon":14,"links":14},{"title":1537,"path":1538,"stem":1539,"description":1540,"icon":14,"links":14},"Advanced Types with the Directus SDK","/tutorials/tips-and-tricks/advanced-types-with-the-directus-sdk","tutorials/3.tips-and-tricks/advanced-types-with-the-directus-sdk","Learn how to more-easily work with types and the Directus SDK.",{"title":1542,"path":1543,"stem":1544,"description":1545,"icon":14,"links":14},"Build a Monitoring Pipeline For Flows And Extensions","/tutorials/tips-and-tricks/build-a-monitoring-pipeline-for-flows-and-extensions","tutorials/3.tips-and-tricks/build-a-monitoring-pipeline-for-flows-and-extensions-","Learn how to set up complex pipelines to monitor automations and extensions.",{"title":1547,"path":1548,"stem":1549,"description":1550,"icon":14,"links":14},"Configure Okta as a Single Sign-On Provider","/tutorials/tips-and-tricks/configure-okta-as-a-single-sign-on-provider","tutorials/3.tips-and-tricks/configure-okta-as-a-single-sign-on-provider","Learn how to set up Okta SSO with the SAML authentication mechanism.",{"title":1552,"path":1553,"stem":1554,"description":1555,"icon":14,"links":14},"Implement Pagination and Infinite Scrolling in Next.js","/tutorials/tips-and-tricks/implement-pagination-and-infinite-scrolling-in-next-js","tutorials/3.tips-and-tricks/implement-pagination-and-infinite-scrolling-in-next-js-","Learn various techniques to load paginated data in your Next.js application.",{"title":1557,"path":1558,"stem":1559,"description":1560,"icon":14,"links":14},"Importing Files in Directus Automate","/tutorials/tips-and-tricks/importing-files-in-directus-automate","tutorials/3.tips-and-tricks/importing-files-in-directus-automate","Learn how to use the Request URL operation to import files in Directus Automate.",{"title":1562,"path":1563,"stem":1564,"description":1565,"icon":14,"links":14},"Preview Files in Live Preview with Google Docs Previews","/tutorials/tips-and-tricks/preview-files-in-live-preview-with-google-docs-previews","tutorials/3.tips-and-tricks/preview-files-in-live-preview-with-google-docs-previews","Learn how to use Google Gview to preview many file formats in Directus Editor.",{"title":1567,"path":1568,"stem":1569,"description":1570,"icon":14,"links":14},"Search Engine Optimization Best Practices","/tutorials/tips-and-tricks/search-engine-optimization-best-practices","tutorials/3.tips-and-tricks/search-engine-optimization-best-practices","Learn some best practices for enabling SEO in your projects using Directus.",{"title":1572,"path":1573,"stem":1574,"description":1575,"icon":14,"links":14},"Understanding Kubernetes","/tutorials/tips-and-tricks/understanding-kubernetes","tutorials/3.tips-and-tricks/understanding-kubernetes","Learn about key Kubernetes concepts and how they interact with each other.",{"title":1577,"path":1578,"stem":1579,"children":1580,"description":24,"icon":14,"links":14},"Migration","/tutorials/migration","tutorials/4.migration/index",[1581,1582,1587,1592,1597],{"title":1577,"path":1578,"stem":1579,"description":24,"icon":14,"links":14},{"title":1583,"path":1584,"stem":1585,"description":1586,"icon":14,"links":14},"Migrate from Notion to Directus","/tutorials/migration/migrate-from-notion-to-directus","tutorials/4.migration/migrate-from-notion-to-directus","Learn how to migrate data from Notion databases to Directus.",{"title":1588,"path":1589,"stem":1590,"description":1591,"icon":14,"links":14},"Migrate from Nuxt Content to Directus","/tutorials/migration/migrate-from-nuxt-content-to-directus","tutorials/4.migration/migrate-from-nuxt-content-to-directus","Learn how to move from a flat-file CMS to Directus.",{"title":1593,"path":1594,"stem":1595,"description":1596,"icon":14,"links":14},"Migrate from WordPress to Directus","/tutorials/migration/migrate-from-wordpress-to-directus","tutorials/4.migration/migrate-from-wordpress-to-directus","Learn how to migrate posts and images to Directus, with tips on plugins.",{"title":1598,"path":1599,"stem":1600,"description":1601,"icon":14,"links":14},"Promoting Changes Between Environments in Directus","/tutorials/migration/promoting-changes-between-environments-in-directus","tutorials/4.migration/promoting-changes-between-environments-in-directus","Learn the options to migrate schema and data between Directus projects.",{"title":372,"path":1603,"stem":1604,"children":1605,"description":1607,"icon":14,"links":14},"/tutorials/extensions","tutorials/5.extensions/index",[1606,1608,1613,1618,1623,1628,1633,1638,1643,1650,1657,1664,1669,1674,1679,1684,1689,1694,1699,1704,1709,1714],{"title":372,"path":1603,"stem":1604,"description":1607,"icon":14,"links":14},"All about extensions",{"title":1609,"path":1610,"stem":1611,"description":1612,"icon":14,"links":14},"Check Permissions in a Custom Endpoint","/tutorials/extensions/check-permissions-in-a-custom-endpoint","tutorials/5.extensions/check-permissions-in-a-custom-endpoint","Learn how to use internal Directus permissions when creating a custom endpoint.",{"title":1614,"path":1615,"stem":1616,"description":1617,"icon":14,"links":14},"Create Collection Items in Custom Panels","/tutorials/extensions/create-collection-items-in-custom-panels","tutorials/5.extensions/create-collection-items-in-custom-panels","Learn how to use built-in interfaces and composables to create new collections.",{"title":1619,"path":1620,"stem":1621,"description":1622,"icon":14,"links":14},"Create New Customers in Stripe in a Custom Hook","/tutorials/extensions/create-new-customers-in-stripe-in-a-custom-hook","tutorials/5.extensions/create-new-customers-in-stripe-in-a-custom-hook","Learn how to use the Stripe SDK to create data when actions occur in Directus.",{"title":1624,"path":1625,"stem":1626,"description":1627,"icon":14,"links":14},"Display External API Data From Vonage In Custom Panels","/tutorials/extensions/display-external-api-data-from-vonage-in-custom-panels","tutorials/5.extensions/display-external-api-data-from-vonage-in-custom-panels","Learn how to display records from external systems in Directus Insights.",{"title":1629,"path":1630,"stem":1631,"description":1632,"icon":14,"links":14},"Display External Weather API Data In Custom Panels","/tutorials/extensions/display-external-weather-api-data-in-custom-panels","tutorials/5.extensions/display-external-weather-api-data-in-custom-panels","Learn how to display external data in panels with a bundle and endpoint.",{"title":1634,"path":1635,"stem":1636,"description":1637,"icon":14,"links":14},"Format Dates in a Custom Display Extension","/tutorials/extensions/format-dates-in-a-custom-display-extension","tutorials/5.extensions/format-dates-in-a-custom-display-extension","Learn how to build a custom display to format data in Directus.",{"title":1639,"path":1640,"stem":1641,"description":1642,"icon":14,"links":14},"Implement Navigation in Multipage Custom Modules","/tutorials/extensions/implement-navigation-in-multipage-custom-modules","tutorials/5.extensions/implement-navigation-in-multipage-custom-modules","Learn how to navigate between multiple pages in module extensions.",{"title":1644,"path":1645,"stem":1646,"children":1647,"description":1649,"icon":14,"links":14},"Integrate Algolia Indexing with Custom Hooks","/tutorials/extensions/integrate-algolia-indexing-with-custom-hooks","tutorials/5.extensions/integrate-algolia-indexing-with-custom-hooks",[1648],{"title":1644,"path":1645,"stem":1646,"description":1649,"icon":14,"links":14},"Learn how to maintain an Algolia index when data is created, updated, and deleted.",{"title":1651,"path":1652,"stem":1653,"children":1654,"description":1656,"icon":14,"links":14},"Integrate Elasticsearch Indexing with Custom Hooks","/tutorials/extensions/integrate-elasticsearch-indexing-with-custom-hooks","tutorials/5.extensions/integrate-elasticsearch-indexing-with-custom-hooks",[1655],{"title":1651,"path":1652,"stem":1653,"description":1656,"icon":14,"links":14},"Learn how to maintain an Elasticsearch index when data is created, updated, and deleted.",{"title":1658,"path":1659,"stem":1660,"children":1661,"description":1663,"icon":14,"links":14},"Integrate Meilisearch Indexing with Custom Hooks","/tutorials/extensions/integrate-meilisearch-indexing-with-custom-hooks","tutorials/5.extensions/integrate-meilisearch-indexing-with-custom-hooks",[1662],{"title":1658,"path":1659,"stem":1660,"description":1663,"icon":14,"links":14},"Learn how to maintain an Meilisearch index when data is created, updated, and deleted.",{"title":1665,"path":1666,"stem":1667,"description":1668,"icon":14,"links":14},"Monitor and Error Track with Sentry in Custom Hooks","/tutorials/extensions/monitor-and-error-track-with-sentry-in-custom-hooks","tutorials/5.extensions/monitor-and-error-track-with-sentry-in-custom-hooks","Learn how to integrate Sentry error tracking in both your API and Data Studio.",{"title":1670,"path":1671,"stem":1672,"description":1673,"icon":14,"links":14},"Proxy an External API in a Custom Endpoint Extension","/tutorials/extensions/proxy-an-external-api-in-a-custom-endpoint-extension","tutorials/5.extensions/proxy-an-external-api-in-a-custom-endpoint-extension","Learn how to make external APIs available via Directus in a custom endpoint.",{"title":1675,"path":1676,"stem":1677,"description":1678,"icon":14,"links":14},"Read Collection Data in Custom Layouts","/tutorials/extensions/read-collection-data-in-custom-layouts","tutorials/5.extensions/read-collection-data-in-custom-layouts","Learn how to build your first layout with data from a collection.",{"title":1680,"path":1681,"stem":1682,"description":1683,"icon":14,"links":14},"Send SMS Messages with Twilio in Custom Operations","/tutorials/extensions/send-sms-messages-with-twilio-in-custom-operations","tutorials/5.extensions/send-sms-messages-with-twilio-in-custom-operations","Learn how to build a custom operation that uses the Twilio SDK.",{"title":1685,"path":1686,"stem":1687,"description":1688,"icon":14,"links":14},"Send SMS Messages with Twilio in Custom Panels","/tutorials/extensions/send-sms-messages-with-twilio-in-custom-panels","tutorials/5.extensions/send-sms-messages-with-twilio-in-custom-panels","Learn how to build a form inside a panel extension and use external APIs.",{"title":1690,"path":1691,"stem":1692,"description":1693,"icon":14,"links":14},"Summarize Relational Items in a Custom Display Extension","/tutorials/extensions/summarize-relational-items-in-a-custom-display-extension","tutorials/5.extensions/summarize-relational-items-in-a-custom-display-extension","Learn how to work with relational data in display extensions.",{"title":1695,"path":1696,"stem":1697,"description":1698,"icon":14,"links":14},"Understand Available Slots in Custom Modules","/tutorials/extensions/understand-available-slots-in-custom-modules","tutorials/5.extensions/understand-available-slots-in-custom-modules","Learn about all of the slots available in your custom modules.",{"title":1700,"path":1701,"stem":1702,"description":1703,"icon":14,"links":14},"Use Dynamic Values in Custom Email Templates","/tutorials/extensions/use-dynamic-values-in-custom-email-templates","tutorials/5.extensions/use-dynamic-values-in-custom-email-templates","Learn how to inject dynamic data into liquid templates.",{"title":1705,"path":1706,"stem":1707,"description":1708,"icon":14,"links":14},"Use npm Packages in Custom Operations","/tutorials/extensions/use-npm-packages-in-custom-operations","tutorials/5.extensions/use-npm-packages-in-custom-operations","Learn how to expose an npm package as an operation in Directus Automate.",{"title":1710,"path":1711,"stem":1712,"description":1713,"icon":14,"links":14},"Validate Phone Numbers with Twilio in a Custom Hook","/tutorials/extensions/validate-phone-numbers-with-twilio-in-a-custom-hook","tutorials/5.extensions/validate-phone-numbers-with-twilio-in-a-custom-hook","Learn how to prevent an item from saving if it has an invalid phone number.",{"title":1715,"path":1716,"stem":1717,"description":1718,"icon":14,"links":14},"Validating Third-Party JWTs in Directus (with Okta)","/tutorials/extensions/validating-third-party-jwts-in-directus","tutorials/5.extensions/validating-third-party-jwts-in-directus","Learn how to translate third part JWT's to Directus accountability",{"title":1114,"path":1720,"stem":1721,"children":1722,"description":24,"icon":14,"links":14},"/tutorials/self-hosting","tutorials/6.self-hosting/index",[1723,1724,1729,1734,1739,1744],{"title":1114,"path":1720,"stem":1721,"description":24,"icon":14,"links":14},{"title":1725,"path":1726,"stem":1727,"description":1728,"icon":14,"links":14},"Deploy Directus to an Ubuntu Server","/tutorials/self-hosting/deploy-directus-to-an-ubuntu-server","tutorials/6.self-hosting/deploy-directus-to-an-ubuntu-server","Learn how to deploy Directus on a Docker container on an Ubuntu server.",{"title":1730,"path":1731,"stem":1732,"description":1733,"icon":14,"links":14},"Deploy Directus to AWS EC2","/tutorials/self-hosting/deploy-directus-to-aws-ec2","tutorials/6.self-hosting/deploy-directus-to-aws-ec2","Learn how to deploy a Directus to AWS EC2, with a RDS database and a S3 storage bucket.",{"title":1735,"path":1736,"stem":1737,"description":1738,"icon":14,"links":14},"Deploy Directus to Azure Web Apps","/tutorials/self-hosting/deploy-directus-to-azure-web-apps","tutorials/6.self-hosting/deploy-directus-to-azure-web-apps","Learn how to deploy Directus on a Docker container on Azure.",{"title":1740,"path":1741,"stem":1742,"description":1743,"icon":14,"links":14},"Deploy Directus to Digital Ocean","/tutorials/self-hosting/deploy-directus-to-digital-ocean","tutorials/6.self-hosting/deploy-directus-to-digital-ocean","Learn how to deploy Directus on the Digital Ocean App Platform.",{"title":1745,"path":1746,"stem":1747,"description":1748,"icon":14,"links":14},"Deploy Directus to Google Cloud Platform","/tutorials/self-hosting/deploy-directus-to-google-cloud-platform","tutorials/6.self-hosting/deploy-directus-to-google-cloud-platform","Learn how to deploy Directus on GCP with a Cloud SQL database and Cloud Storage Bucket.",{"title":1750,"path":1751,"stem":1752,"children":1753,"description":24,"icon":14,"links":14},"Workflows","/tutorials/workflows","tutorials/7.workflows/index",[1754,1755,1760,1765,1770,1775,1780,1785,1790,1795,1800,1805,1810,1815,1820],{"title":1750,"path":1751,"stem":1752,"description":24,"icon":14,"links":14},{"title":1756,"path":1757,"stem":1758,"description":1759,"icon":14,"links":14},"Build Content Approval Workflows with Custom Permissions","/tutorials/workflows/build-content-approval-workflows-with-custom-permissions","tutorials/7.workflows/build-content-approval-workflows-with-custom-permissions","Learn how to configure roles and permissions for complex automations.",{"title":1761,"path":1762,"stem":1763,"description":1764,"icon":14,"links":14},"Combine Live Preview and Content Versioning with Next.js","/tutorials/workflows/combine-live-preview-and-content-versioning-with-next-js","tutorials/7.workflows/combine-live-preview-and-content-versioning-with-next-js","Learn how to set up Live Preview with different content versions in your Next.js application.",{"title":1766,"path":1767,"stem":1768,"description":1769,"icon":14,"links":14},"Create GitHub Issues with Directus Automate","/tutorials/workflows/create-github-issues-with-directus-automate","tutorials/7.workflows/create-github-issues-with-directus-automate","Learn how to integrate GitHub with Directus Automate to create new issues.",{"title":1771,"path":1772,"stem":1773,"description":1774,"icon":14,"links":14},"Detect High-Risk Phone Numbers with Vonage and Directus Automate","/tutorials/workflows/detect-high-risk-phone-numbers-with-vonage-and-directus-automate","tutorials/7.workflows/detect-high-risk-phone-numbers-with-vonage-and-directus-automate","Learn how to integrate Vonage's Number Insights API with Directus Automate to validate numbers.",{"title":1776,"path":1777,"stem":1778,"description":1779,"icon":14,"links":14},"Enrich User Data with Clearbit and Directus Automate","/tutorials/workflows/enrich-user-data-with-clearbit-and-directus-automate","tutorials/7.workflows/enrich-user-data-with-clearbit-and-directus-automate","Learn how to integrate Clearbit data enrichment with Directus Automate.",{"title":1781,"path":1782,"stem":1783,"description":1784,"icon":14,"links":14},"Generate Images with DALL•E and Directus Automate","/tutorials/workflows/generate-images-with-dall-e-and-directus-automate","tutorials/7.workflows/generate-images-with-dall-e-and-directus-automate","Learn how to integrate OpenAI's Dall•E models with Directus Automate.",{"title":1786,"path":1787,"stem":1788,"description":1789,"icon":14,"links":14},"Generate Social Posts with GPT-4 and Directus Automate","/tutorials/workflows/generate-social-posts-with-gpt-4-and-directus-automate","tutorials/7.workflows/generate-social-posts-with-gpt-4-and-directus-automate","Learn how to integrate OpenAI's GPT-4 model with Directus Automate.",{"title":1791,"path":1792,"stem":1793,"description":1794,"icon":14,"links":14},"Generate Transcripts with Deepgram and Directus Automate","/tutorials/workflows/generate-transcripts-with-deepgram-and-directus-automate","tutorials/7.workflows/generate-transcripts-with-deepgram-and-directus-automate","Learn how to integrate Deepgram's Speech-to-Text API with Directus Automate.",{"title":1796,"path":1797,"stem":1798,"description":1799,"icon":14,"links":14},"Integrating Multilingual Content with Directus and Crowdin","/tutorials/workflows/integrating-multilingual-content-with-directus-and-crowdin","tutorials/7.workflows/integrating-multilingual-content-with-directus-and-crowdin","Learn how to localize content in Directus using Crowdin's connector with Directus.",{"title":1801,"path":1802,"stem":1803,"description":1804,"icon":14,"links":14},"Invincible AI content workflows with Inngest and Directus","/tutorials/workflows/invincible-ai-content-workflows-with-inngest-and-directus","tutorials/7.workflows/invincible-ai-content-workflows-with-inngest-and-directus","Learn how to configure integration Directus and Inngest to build durable workflows for any scale.",{"title":1806,"path":1807,"stem":1808,"description":1809,"icon":14,"links":14},"Schedule Future Content with Directus Automate","/tutorials/workflows/schedule-future-content-with-directus-automate","tutorials/7.workflows/schedule-future-content-with-directus-automate","Learn how to set content to be scheduled on a future date with Directs Automate.",{"title":1811,"path":1812,"stem":1813,"description":1814,"icon":14,"links":14},"Tag Images with Clarifai and Directus Automate","/tutorials/workflows/tag-images-with-clarifai-and-directus-automate","tutorials/7.workflows/tag-images-with-clarifai-and-directus-automate","Learn how to integrate Clarifai's image recognition APIs with Directus Automate.",{"title":1816,"path":1817,"stem":1818,"description":1819,"icon":14,"links":14},"Trigger Netlify Site Builds with Directus Automate","/tutorials/workflows/trigger-netlify-site-builds-with-directus-automate","tutorials/7.workflows/trigger-netlify-site-builds-with-directus-automate","Learn how to trigger new Netlify website builds through Directus Automate.",{"title":1821,"path":1822,"stem":1823,"description":1824,"icon":14,"links":14},"Trigger Vercel Site Builds with Directus Automate","/tutorials/workflows/trigger-vercel-site-builds-with-directus-automate","tutorials/7.workflows/trigger-vercel-site-builds-with-directus-automate","Learn how to trigger new Vercel website builds through Directus Automate.",{"id":1826,"icon":1827,"content":1828,"link":1829},"812bf73d-ebfb-4246-9538-937a09a0c795","connected_tv","Learn more about our native MCP","https://directus.io/mcp",{"id":1831,"title":1421,"authors":1832,"body":1836,"description":1424,"extension":5881,"headline":14,"icon":14,"links":14,"meta":5882,"navigation":1955,"path":1422,"rawbody":5884,"seo":5885,"stem":1423,"technologies":5886,"__hash__":5887},"content/tutorials/2.projects/build-a-user-feedback-widget-with-vue-js-.md",[1833],{"name":1834,"title":1835},"Bryant Gillespie","Growth Engineer",{"type":1837,"value":1838,"toc":5861},"minimark",[1839,1843,1848,1851,1854,1857,1864,1871,1874,1879,1886,1891,1916,1920,1923,1933,2007,2011,2014,2034,2039,2050,2323,2326,2338,2342,2345,2806,2859,2862,2866,3445,3460,3463,3474,3478,3939,3946,3960,3963,3970,3974,3977,4868,4872,4878,4885,5098,5105,5112,5653,5656,5660,5667,5670,5679,5685,5690,5702,5707,5710,5713,5720,5726,5729,5735,5738,5742,5745,5751,5754,5760,5764,5767,5771,5774,5781,5785,5791,5794,5799,5802,5810,5814,5817,5849,5858],[1840,1841,1842],"p",{},"One of our DevRel initiatives at Directus is constantly improving our documentation. As a small team with finite time and resources, we rely a lot on user feedback to help guide our writing efforts. But we were missing the most important bit there – your feedback.",[1844,1845,1847],"h2",{"id":1846},"what-were-building","What We’re Building",[1840,1849,1850],{},"At the time of this post, the Directus Docs runs on VitePress (which in turn is based on Vue.js and Vite). Vitepress is a nice bit of kit for quickly generating a static documentation site, but sadly there’s no built-in feature for gathering user feedback.",[1840,1852,1853],{},"So I decided to build my own so our team could make better decisions on where to spend our precious time and attention.",[1840,1855,1856],{},"While this project was built in the context of Vitepress, this post will show you how to do it with Vue generally. Here’s what our finished product will look like.",[1840,1858,1859],{},[1860,1861],"img",{"alt":1862,"src":1863},"Screenshot of Directus documentation article with a highlighted feedback widget at the bottom of the screen.","/img/b3d6f78c-e8e6-4b5d-82f4-0c74b0188472.webp",[1844,1865,1867],{"id":1866},"prerequisites",[1868,1869,1870],"strong",{},"Prerequisites",[1840,1872,1873],{},"Before we hop 🐰 in , here’s what you’ll need to follow along:",[1840,1875,1876],{},[1868,1877,1878],{},"Knowledge",[1880,1881,1882],"ul",{},[1883,1884,1885],"li",{},"Beginner knowledge of Javascript, Typescript, and Vue.js (Composition API)",[1840,1887,1888],{},[1868,1889,1890],{},"Tooling",[1880,1892,1893,1908],{},[1883,1894,1895,1896,1900,1901,1907],{},"A Directus instance up and running (either ",[1897,1898,1899],"a",{"href":434},"self-hosted"," or on ",[1897,1902,1906],{"href":1903,"rel":1904},"https://directus.cloud/",[1905],"nofollow","Directus Cloud",")",[1883,1909,1910,1911,1907],{},"A Vue.js project set up (",[1897,1912,1915],{"href":1913,"rel":1914},"https://vuejs.org/guide/scaling-up/tooling.html#tooling",[1905],"Using Vite is recommended",[1844,1917,1919],{"id":1918},"preparing-directus-collection","Preparing Directus Collection",[1840,1921,1922],{},"First off, we're going to need a place to store all this valuable feedback we'll be gathering.",[1840,1924,1925,1926,1932],{},"Create a ",[1868,1927,1928],{},[1929,1930,1931],"code",{},"docs_feedback"," collection with the following data model:",[1934,1935,1939],"pre",{"className":1936,"code":1937,"language":1938,"meta":24,"style":24},"language-markdown shiki shiki-themes github-light github-light github-dark","docs_feedback\n\n- id (Type: uuid)\n- date_created (Type: Timestamp, Interface: Date/Time)\n- url (Type: String, Interface: Input)\n- rating (Type: Integer, Interface: Slider)\n- title (Type: String, Interface: Input)\n- comments (Type: Text, Interface: Textarea)\n","markdown",[1929,1940,1941,1950,1957,1967,1975,1983,1991,1999],{"__ignoreMap":24},[1942,1943,1946],"span",{"class":1944,"line":1945},"line",1,[1942,1947,1949],{"class":1948},"sxrX7","docs_feedback\n",[1942,1951,1953],{"class":1944,"line":1952},2,[1942,1954,1956],{"emptyLinePlaceholder":1955},true,"\n",[1942,1958,1960,1964],{"class":1944,"line":1959},3,[1942,1961,1963],{"class":1962},"sP4rz","-",[1942,1965,1966],{"class":1948}," id (Type: uuid)\n",[1942,1968,1970,1972],{"class":1944,"line":1969},4,[1942,1971,1963],{"class":1962},[1942,1973,1974],{"class":1948}," date_created (Type: Timestamp, Interface: Date/Time)\n",[1942,1976,1978,1980],{"class":1944,"line":1977},5,[1942,1979,1963],{"class":1962},[1942,1981,1982],{"class":1948}," url (Type: String, Interface: Input)\n",[1942,1984,1986,1988],{"class":1944,"line":1985},6,[1942,1987,1963],{"class":1962},[1942,1989,1990],{"class":1948}," rating (Type: Integer, Interface: Slider)\n",[1942,1992,1994,1996],{"class":1944,"line":1993},7,[1942,1995,1963],{"class":1962},[1942,1997,1998],{"class":1948}," title (Type: String, Interface: Input)\n",[1942,2000,2002,2004],{"class":1944,"line":2001},8,[1942,2003,1963],{"class":1962},[1942,2005,2006],{"class":1948}," comments (Type: Text, Interface: Textarea)\n",[1844,2008,2010],{"id":2009},"creating-vue-component-for-article-feedback","Creating Vue Component for Article Feedback",[1840,2012,2013],{},"Just as if it were the lone dev on a cross-functional team – we’re going to place a lot of different responsibilities on our hard-working little Vue component.",[1880,2015,2016,2022,2028],{},[1883,2017,2018,2021],{},[1868,2019,2020],{},"Rating System",": We’ll use a 1 to 4 scale, with each value associated with a different message. These messages will help engage users and guide them through the feedback process.",[1883,2023,2024,2027],{},[1868,2025,2026],{},"Open Ended Feedback",": We provide a text area for users to write their thoughts. This is where the gold is. We want users to share their ideas, suggestions, and insights – positive or constructive 😭.",[1883,2029,2030,2033],{},[1868,2031,2032],{},"Posting Data to Directus",": The component handles the submission of the feedback to Directus. It constructs the feedback object and makes a POST request to the feedback API endpoint.",[2035,2036,2038],"h3",{"id":2037},"scaffolding-the-feedback-component","Scaffolding the Feedback Component",[1840,2040,2041,2042,2045,2046,2049],{},"Create a new file in our ",[1929,2043,2044],{},"components"," directory named ",[1929,2047,2048],{},"ArticleFeedback.vue"," . Then copy and paste the following code.",[1934,2051,2055],{"className":2052,"code":2053,"language":2054,"meta":24,"style":24},"language-vue shiki shiki-themes github-light github-light github-dark","\u003Cscript setup lang=\"ts\">\n\u003C/script>\n\n\u003Ctemplate>\n    \u003Cdiv class=\"wrapper\">\n        \u003Cdiv class=\"step\">\n            \u003C!-- Step 1. Show Rating Buttons -->\n            \u003Cdiv>\n                \u003Cp class=\"desc\">How can we improve?\u003C/p>\n                \u003Cp class=\"heading\">How helpful was this article?\u003C/p>\n            \u003C/div>\n        \u003C/div>\n        \u003Cdiv class=\"step\">\n            \u003C!-- Step 2. Ask for Comments -->\n        \u003C/div>\n        \u003Cdiv class=\"step\">\n            \u003C!-- Step 3. Show Success Message -->\n        \u003C/div>\n    \u003C/div>\n\u003C/template>\n\n\u003Cstyle scoped>\n\u003C/style>\n","vue",[1929,2056,2057,2083,2092,2096,2105,2123,2139,2145,2154,2176,2197,2207,2217,2232,2238,2247,2262,2268,2277,2287,2296,2301,2314],{"__ignoreMap":24},[1942,2058,2059,2062,2066,2070,2073,2076,2080],{"class":1944,"line":1945},[1942,2060,2061],{"class":1948},"\u003C",[1942,2063,2065],{"class":2064},"sovSZ","script",[1942,2067,2069],{"class":2068},"snPdu"," setup",[1942,2071,2072],{"class":2068}," lang",[1942,2074,2075],{"class":1948},"=",[1942,2077,2079],{"class":2078},"sIIMD","\"ts\"",[1942,2081,2082],{"class":1948},">\n",[1942,2084,2085,2088,2090],{"class":1944,"line":1952},[1942,2086,2087],{"class":1948},"\u003C/",[1942,2089,2065],{"class":2064},[1942,2091,2082],{"class":1948},[1942,2093,2094],{"class":1944,"line":1959},[1942,2095,1956],{"emptyLinePlaceholder":1955},[1942,2097,2098,2100,2103],{"class":1944,"line":1969},[1942,2099,2061],{"class":1948},[1942,2101,2102],{"class":2064},"template",[1942,2104,2082],{"class":1948},[1942,2106,2107,2110,2113,2116,2118,2121],{"class":1944,"line":1977},[1942,2108,2109],{"class":1948},"    \u003C",[1942,2111,2112],{"class":2064},"div",[1942,2114,2115],{"class":2068}," class",[1942,2117,2075],{"class":1948},[1942,2119,2120],{"class":2078},"\"wrapper\"",[1942,2122,2082],{"class":1948},[1942,2124,2125,2128,2130,2132,2134,2137],{"class":1944,"line":1985},[1942,2126,2127],{"class":1948},"        \u003C",[1942,2129,2112],{"class":2064},[1942,2131,2115],{"class":2068},[1942,2133,2075],{"class":1948},[1942,2135,2136],{"class":2078},"\"step\"",[1942,2138,2082],{"class":1948},[1942,2140,2141],{"class":1944,"line":1993},[1942,2142,2144],{"class":2143},"sCsY4","            \u003C!-- Step 1. Show Rating Buttons -->\n",[1942,2146,2147,2150,2152],{"class":1944,"line":2001},[1942,2148,2149],{"class":1948},"            \u003C",[1942,2151,2112],{"class":2064},[1942,2153,2082],{"class":1948},[1942,2155,2157,2160,2162,2164,2166,2169,2172,2174],{"class":1944,"line":2156},9,[1942,2158,2159],{"class":1948},"                \u003C",[1942,2161,1840],{"class":2064},[1942,2163,2115],{"class":2068},[1942,2165,2075],{"class":1948},[1942,2167,2168],{"class":2078},"\"desc\"",[1942,2170,2171],{"class":1948},">How can we improve?\u003C/",[1942,2173,1840],{"class":2064},[1942,2175,2082],{"class":1948},[1942,2177,2179,2181,2183,2185,2187,2190,2193,2195],{"class":1944,"line":2178},10,[1942,2180,2159],{"class":1948},[1942,2182,1840],{"class":2064},[1942,2184,2115],{"class":2068},[1942,2186,2075],{"class":1948},[1942,2188,2189],{"class":2078},"\"heading\"",[1942,2191,2192],{"class":1948},">How helpful was this article?\u003C/",[1942,2194,1840],{"class":2064},[1942,2196,2082],{"class":1948},[1942,2198,2200,2203,2205],{"class":1944,"line":2199},11,[1942,2201,2202],{"class":1948},"            \u003C/",[1942,2204,2112],{"class":2064},[1942,2206,2082],{"class":1948},[1942,2208,2210,2213,2215],{"class":1944,"line":2209},12,[1942,2211,2212],{"class":1948},"        \u003C/",[1942,2214,2112],{"class":2064},[1942,2216,2082],{"class":1948},[1942,2218,2220,2222,2224,2226,2228,2230],{"class":1944,"line":2219},13,[1942,2221,2127],{"class":1948},[1942,2223,2112],{"class":2064},[1942,2225,2115],{"class":2068},[1942,2227,2075],{"class":1948},[1942,2229,2136],{"class":2078},[1942,2231,2082],{"class":1948},[1942,2233,2235],{"class":1944,"line":2234},14,[1942,2236,2237],{"class":2143},"            \u003C!-- Step 2. Ask for Comments -->\n",[1942,2239,2241,2243,2245],{"class":1944,"line":2240},15,[1942,2242,2212],{"class":1948},[1942,2244,2112],{"class":2064},[1942,2246,2082],{"class":1948},[1942,2248,2250,2252,2254,2256,2258,2260],{"class":1944,"line":2249},16,[1942,2251,2127],{"class":1948},[1942,2253,2112],{"class":2064},[1942,2255,2115],{"class":2068},[1942,2257,2075],{"class":1948},[1942,2259,2136],{"class":2078},[1942,2261,2082],{"class":1948},[1942,2263,2265],{"class":1944,"line":2264},17,[1942,2266,2267],{"class":2143},"            \u003C!-- Step 3. Show Success Message -->\n",[1942,2269,2271,2273,2275],{"class":1944,"line":2270},18,[1942,2272,2212],{"class":1948},[1942,2274,2112],{"class":2064},[1942,2276,2082],{"class":1948},[1942,2278,2280,2283,2285],{"class":1944,"line":2279},19,[1942,2281,2282],{"class":1948},"    \u003C/",[1942,2284,2112],{"class":2064},[1942,2286,2082],{"class":1948},[1942,2288,2290,2292,2294],{"class":1944,"line":2289},20,[1942,2291,2087],{"class":1948},[1942,2293,2102],{"class":2064},[1942,2295,2082],{"class":1948},[1942,2297,2299],{"class":1944,"line":2298},21,[1942,2300,1956],{"emptyLinePlaceholder":1955},[1942,2302,2304,2306,2309,2312],{"class":1944,"line":2303},22,[1942,2305,2061],{"class":1948},[1942,2307,2308],{"class":2064},"style",[1942,2310,2311],{"class":2068}," scoped",[1942,2313,2082],{"class":1948},[1942,2315,2317,2319,2321],{"class":1944,"line":2316},23,[1942,2318,2087],{"class":1948},[1942,2320,2308],{"class":2064},[1942,2322,2082],{"class":1948},[1840,2324,2325],{},"We’ve got three different states (or steps as I’m calling them) we’ll need to build.",[2327,2328,2329,2332,2335],"ol",{},[1883,2330,2331],{},"An initial state that shows the feedback prompt and rating buttons.",[1883,2333,2334],{},"Once a rating has been selected, a state which asks for comments and feedback.",[1883,2336,2337],{},"A success state once form submission is complete.",[2035,2339,2341],{"id":2340},"adding-props-and-reactive-logic","Adding Props and Reactive Logic",[1840,2343,2344],{},"Now let’s start adding our logic to control these three steps.",[1934,2346,2349],{"className":2347,"code":2348,"language":2054,"meta":24,"style":24},"language-vue shiki shiki-themes github-light github-light github-dark has-diff","\u003Cscript setup lang=\"ts\">\nimport { ref, reactive } from 'vue'; // [!code ++]\n\nconst props = defineProps\u003C{  // [!code ++]\n    title: string;  // [!code ++]\n    url: string  // [!code ++]\n}>(); // [!code ++]\n\nconst feedback = reactive\u003C{ // [!code ++]\n    id?: string; // [!code ++]\n    rating?: number; // [!code ++]\n    comments?: string; // [!code ++]\n}>({}); // [!code ++]\n\nconst success = ref(false); // [!code ++]\n\u003C/script>\n\n\u003Ctemplate>\n    \u003Cdiv class=\"wrapper\">\n        \u003Cdiv class=\"step\"> // [!code --]\n        \u003Cdiv v-if=\"!feedback.rating\" class=\"step\"> // [!code ++]\n            \u003C!-- Step 1. Show Rating Buttons -->\n            \u003Cdiv>\n                \u003Cp class=\"desc\">How can we improve?\u003C/p>\n                \u003Cp class=\"heading\">How helpful was this article?\u003C/p>\n            \u003C/div>\n        \u003C/div>\n        \u003Cdiv class=\"step\"> // [!code --]\n        \u003Cdiv v-else-if=\"feedback.rating && !success\" class=\"step\"> // [!code ++]\n            \u003C!-- Step 2. Ask for Comments -->\n        \u003C/div>\n        \u003Cdiv class=\"step\"> // [!code --]\n        \u003Cdiv v-else class=\"step\"> // [!code ++]\n            \u003C!-- Step 3. Show Success Message -->\n        \u003C/div>\n    \u003C/div>\n\u003C/template>\n\n\u003Cstyle scoped>\n\u003C/style>\n",[1929,2350,2351,2367,2388,2392,2413,2419,2425,2437,2441,2459,2465,2477,2488,2498,2502,2524,2532,2536,2544,2558,2573,2596,2600,2608,2627,2646,2655,2664,2679,2702,2707,2716,2731,2749,2754,2763,2772,2781,2786,2797],{"__ignoreMap":24},[1942,2352,2353,2355,2357,2359,2361,2363,2365],{"class":1944,"line":1945},[1942,2354,2061],{"class":1948},[1942,2356,2065],{"class":2064},[1942,2358,2069],{"class":2068},[1942,2360,2072],{"class":2068},[1942,2362,2075],{"class":1948},[1942,2364,2079],{"class":2078},[1942,2366,2082],{"class":1948},[1942,2368,2372,2376,2379,2382,2385],{"class":2369,"line":1952},[1944,2370,2371],"diff","add",[1942,2373,2375],{"class":2374},"s8jYJ","import",[1942,2377,2378],{"class":1948}," { ref, reactive } ",[1942,2380,2381],{"class":2374},"from",[1942,2383,2384],{"class":2078}," 'vue'",[1942,2386,2387],{"class":1948},"; ",[1942,2389,2390],{"class":1944,"line":1959},[1942,2391,1956],{"emptyLinePlaceholder":1955},[1942,2393,2395,2398,2402,2405,2408,2410],{"class":2394,"line":1969},[1944,2370,2371],[1942,2396,2397],{"class":2374},"const",[1942,2399,2401],{"class":2400},"sBjJW"," props",[1942,2403,2404],{"class":2374}," =",[1942,2406,2407],{"class":1948}," defineProps",[1942,2409,2061],{"class":2374},[1942,2411,2412],{"class":1948},"{  ",[1942,2414,2416],{"class":2415,"line":1977},[1944,2370,2371],[1942,2417,2418],{"class":1948},"    title: string;  ",[1942,2420,2422],{"class":2421,"line":1985},[1944,2370,2371],[1942,2423,2424],{"class":1948},"    url: string  ",[1942,2426,2428,2431,2434],{"class":2427,"line":1993},[1944,2370,2371],[1942,2429,2430],{"class":1948},"}",[1942,2432,2433],{"class":2374},">",[1942,2435,2436],{"class":1948},"(); ",[1942,2438,2439],{"class":1944,"line":2001},[1942,2440,1956],{"emptyLinePlaceholder":1955},[1942,2442,2444,2446,2449,2451,2454,2456],{"class":2443,"line":2156},[1944,2370,2371],[1942,2445,2397],{"class":2374},[1942,2447,2448],{"class":2400}," feedback",[1942,2450,2404],{"class":2374},[1942,2452,2453],{"class":1948}," reactive",[1942,2455,2061],{"class":2374},[1942,2457,2458],{"class":1948},"{ ",[1942,2460,2462],{"class":2461,"line":2178},[1944,2370,2371],[1942,2463,2464],{"class":1948},"    id?: string; ",[1942,2466,2468,2471,2474],{"class":2467,"line":2199},[1944,2370,2371],[1942,2469,2470],{"class":1948},"    rating",[1942,2472,2473],{"class":2374},"?:",[1942,2475,2476],{"class":1948}," number; ",[1942,2478,2480,2483,2485],{"class":2479,"line":2209},[1944,2370,2371],[1942,2481,2482],{"class":1948},"    comments",[1942,2484,2473],{"class":2374},[1942,2486,2487],{"class":1948}," string; ",[1942,2489,2491,2493,2495],{"class":2490,"line":2219},[1944,2370,2371],[1942,2492,2430],{"class":1948},[1942,2494,2433],{"class":2374},[1942,2496,2497],{"class":1948},"({}); ",[1942,2499,2500],{"class":1944,"line":2234},[1942,2501,1956],{"emptyLinePlaceholder":1955},[1942,2503,2505,2507,2510,2512,2515,2518,2521],{"class":2504,"line":2240},[1944,2370,2371],[1942,2506,2397],{"class":2374},[1942,2508,2509],{"class":2400}," success",[1942,2511,2404],{"class":2374},[1942,2513,2514],{"class":2068}," ref",[1942,2516,2517],{"class":1948},"(",[1942,2519,2520],{"class":2400},"false",[1942,2522,2523],{"class":1948},"); ",[1942,2525,2526,2528,2530],{"class":1944,"line":2249},[1942,2527,2087],{"class":1948},[1942,2529,2065],{"class":2064},[1942,2531,2082],{"class":1948},[1942,2533,2534],{"class":1944,"line":2264},[1942,2535,1956],{"emptyLinePlaceholder":1955},[1942,2537,2538,2540,2542],{"class":1944,"line":2270},[1942,2539,2061],{"class":1948},[1942,2541,2102],{"class":2064},[1942,2543,2082],{"class":1948},[1942,2545,2546,2548,2550,2552,2554,2556],{"class":1944,"line":2279},[1942,2547,2109],{"class":1948},[1942,2549,2112],{"class":2064},[1942,2551,2115],{"class":2068},[1942,2553,2075],{"class":1948},[1942,2555,2120],{"class":2078},[1942,2557,2082],{"class":1948},[1942,2559,2560,2562,2564,2566,2568,2570],{"class":1944,"line":2289},[1942,2561,2127],{"class":1948},[1942,2563,2112],{"class":2064},[1942,2565,2115],{"class":2068},[1942,2567,2075],{"class":1948},[1942,2569,2136],{"class":2078},[1942,2571,2572],{"class":1948},"> // [!code --]\n",[1942,2574,2575,2577,2579,2582,2584,2587,2589,2591,2593],{"class":1944,"line":2298},[1942,2576,2127],{"class":1948},[1942,2578,2112],{"class":2064},[1942,2580,2581],{"class":2068}," v-if",[1942,2583,2075],{"class":1948},[1942,2585,2586],{"class":2078},"\"!feedback.rating\"",[1942,2588,2115],{"class":2068},[1942,2590,2075],{"class":1948},[1942,2592,2136],{"class":2078},[1942,2594,2595],{"class":1948},"> // [!code ++]\n",[1942,2597,2598],{"class":1944,"line":2303},[1942,2599,2144],{"class":2143},[1942,2601,2602,2604,2606],{"class":1944,"line":2316},[1942,2603,2149],{"class":1948},[1942,2605,2112],{"class":2064},[1942,2607,2082],{"class":1948},[1942,2609,2611,2613,2615,2617,2619,2621,2623,2625],{"class":1944,"line":2610},24,[1942,2612,2159],{"class":1948},[1942,2614,1840],{"class":2064},[1942,2616,2115],{"class":2068},[1942,2618,2075],{"class":1948},[1942,2620,2168],{"class":2078},[1942,2622,2171],{"class":1948},[1942,2624,1840],{"class":2064},[1942,2626,2082],{"class":1948},[1942,2628,2630,2632,2634,2636,2638,2640,2642,2644],{"class":1944,"line":2629},25,[1942,2631,2159],{"class":1948},[1942,2633,1840],{"class":2064},[1942,2635,2115],{"class":2068},[1942,2637,2075],{"class":1948},[1942,2639,2189],{"class":2078},[1942,2641,2192],{"class":1948},[1942,2643,1840],{"class":2064},[1942,2645,2082],{"class":1948},[1942,2647,2649,2651,2653],{"class":1944,"line":2648},26,[1942,2650,2202],{"class":1948},[1942,2652,2112],{"class":2064},[1942,2654,2082],{"class":1948},[1942,2656,2658,2660,2662],{"class":1944,"line":2657},27,[1942,2659,2212],{"class":1948},[1942,2661,2112],{"class":2064},[1942,2663,2082],{"class":1948},[1942,2665,2667,2669,2671,2673,2675,2677],{"class":1944,"line":2666},28,[1942,2668,2127],{"class":1948},[1942,2670,2112],{"class":2064},[1942,2672,2115],{"class":2068},[1942,2674,2075],{"class":1948},[1942,2676,2136],{"class":2078},[1942,2678,2572],{"class":1948},[1942,2680,2682,2684,2686,2689,2691,2694,2696,2698,2700],{"class":1944,"line":2681},29,[1942,2683,2127],{"class":1948},[1942,2685,2112],{"class":2064},[1942,2687,2688],{"class":2068}," v-else-if",[1942,2690,2075],{"class":1948},[1942,2692,2693],{"class":2078},"\"feedback.rating && !success\"",[1942,2695,2115],{"class":2068},[1942,2697,2075],{"class":1948},[1942,2699,2136],{"class":2078},[1942,2701,2595],{"class":1948},[1942,2703,2705],{"class":1944,"line":2704},30,[1942,2706,2237],{"class":2143},[1942,2708,2710,2712,2714],{"class":1944,"line":2709},31,[1942,2711,2212],{"class":1948},[1942,2713,2112],{"class":2064},[1942,2715,2082],{"class":1948},[1942,2717,2719,2721,2723,2725,2727,2729],{"class":1944,"line":2718},32,[1942,2720,2127],{"class":1948},[1942,2722,2112],{"class":2064},[1942,2724,2115],{"class":2068},[1942,2726,2075],{"class":1948},[1942,2728,2136],{"class":2078},[1942,2730,2572],{"class":1948},[1942,2732,2734,2736,2738,2741,2743,2745,2747],{"class":1944,"line":2733},33,[1942,2735,2127],{"class":1948},[1942,2737,2112],{"class":2064},[1942,2739,2740],{"class":2068}," v-else",[1942,2742,2115],{"class":2068},[1942,2744,2075],{"class":1948},[1942,2746,2136],{"class":2078},[1942,2748,2595],{"class":1948},[1942,2750,2752],{"class":1944,"line":2751},34,[1942,2753,2267],{"class":2143},[1942,2755,2757,2759,2761],{"class":1944,"line":2756},35,[1942,2758,2212],{"class":1948},[1942,2760,2112],{"class":2064},[1942,2762,2082],{"class":1948},[1942,2764,2766,2768,2770],{"class":1944,"line":2765},36,[1942,2767,2282],{"class":1948},[1942,2769,2112],{"class":2064},[1942,2771,2082],{"class":1948},[1942,2773,2775,2777,2779],{"class":1944,"line":2774},37,[1942,2776,2087],{"class":1948},[1942,2778,2102],{"class":2064},[1942,2780,2082],{"class":1948},[1942,2782,2784],{"class":1944,"line":2783},38,[1942,2785,1956],{"emptyLinePlaceholder":1955},[1942,2787,2789,2791,2793,2795],{"class":1944,"line":2788},39,[1942,2790,2061],{"class":1948},[1942,2792,2308],{"class":2064},[1942,2794,2311],{"class":2068},[1942,2796,2082],{"class":1948},[1942,2798,2800,2802,2804],{"class":1944,"line":2799},40,[1942,2801,2087],{"class":1948},[1942,2803,2308],{"class":2064},[1942,2805,2082],{"class":1948},[2327,2807,2808,2819,2830,2837,2844],{},[1883,2809,2810,2811,2814,2815,2818],{},"Import the ",[1929,2812,2813],{},"ref"," and ",[1929,2816,2817],{},"reactive"," functions from Vue.",[1883,2820,2821,2822,2825,2826,2829],{},"We’ll pass the ",[1929,2823,2824],{},"url"," and page ",[1929,2827,2828],{},"title"," as props from the parent component that contains this widget.",[1883,2831,2832,2833,2836],{},"Create a reactive object ",[1929,2834,2835],{},"feedback"," to manage our form submission data.",[1883,2838,2839,2840,2843],{},"Create a reactive ",[1929,2841,2842],{},"success"," variable to hold the success state.",[1883,2845,2846,2847,2850,2851,2854,2855,2858],{},"Use ",[1929,2848,2849],{},"v-if",", ",[1929,2852,2853],{},"v-else-if",", and ",[1929,2856,2857],{},"v-else"," to control what step of the feedback process is shown.",[1840,2860,2861],{},"With the logic roughed in, let’s add our rating buttons.",[2035,2863,2865],{"id":2864},"adding-the-rating-options","Adding the Rating Options",[1934,2867,2869],{"className":2347,"code":2868,"language":2054,"meta":24,"style":24},"\u003Cscript setup lang=\"ts\">\nimport { ref, reactive } from 'vue';\n\nconst props = defineProps\u003C{ title: string; url: string }>();\n\nconst feedback = reactive\u003C{\n    id?: string;\n    rating?: number;\n    comments?: string;\n}>({});\n\nconst ratingOptions = [ // [!code ++]\n    { label: 'Worst Doc Ever 🗑️', value: 1, message: 'Woof! 🤦‍♂️ Sorry about that. How do we fix it?' }, // [!code ++]\n    { label: 'Not Helpful 😡', value: 2, message: '🧐 Help us do better. How can we improve this article?' }, // [!code ++]\n    { label: 'Helpful 😃', value: 3, message: 'Nice! 👍 Anything we can improve upon?' }, // [!code ++]\n    { label: 'Super Helpful 🤩', value: 4, message: `Awesome! The whole team is rejoicing in celebration! 🥳🎉🎊 Anything you'd like to say to them?` }, // [!code ++]\n]; // [!code ++]\n\nfunction getRatingOption(rating: number) { // [!code ++]\n    return ratingOptions.find((option) => option.value === rating); // [!code ++]\n} // [!code ++]\n\u003C/script>\n\n\u003Ctemplate>\n    \u003Cdiv class=\"wrapper\">\n        \u003Cdiv v-if=\"!feedback.rating\" class=\"step\">\n            \u003C!-- Step 1. Show Rating Buttons -->\n            \u003Cdiv>\n                \u003Cp class=\"desc\">How can we improve?\u003C/p>\n                \u003Cp class=\"heading\">How helpful was this article?\u003C/p>\n            \u003C/div>\n            \u003Cdiv class=\"button-container\"> // [!code ++]\n                    \u003C!-- We'll add a function for handling button clicks while adding our submission logic -->\n                    \u003Cbutton v-for=\"item in ratingOptions\" :key=\"item.value\" class=\"btn\"> // [!code ++]\n                        \u003Cspan>{{ item.label }}\u003C/span> // [!code ++]\n                    \u003C/button> // [!code ++]\n            \u003C/div> // [!code ++]\n        \u003C/div>\n        \u003Cdiv v-else-if=\"feedback.rating && !success\" class=\"step\">\n            \u003C!-- Step 2. Ask for Comments -->\n        \u003C/div>\n        \u003Cdiv v-else class=\"step\">\n            \u003C!-- Step 3. Show Success Message -->\n        \u003C/div>\n    \u003C/div>\n\u003C/template>\n",[1929,2870,2871,2887,2900,2904,2936,2940,2953,2964,2975,2985,2990,2994,3007,3031,3051,3071,3091,3097,3101,3122,3155,3161,3169,3173,3181,3195,3215,3219,3227,3245,3263,3271,3286,3291,3324,3338,3347,3355,3363,3383,3387,3396,3413,3418,3427,3436],{"__ignoreMap":24},[1942,2872,2873,2875,2877,2879,2881,2883,2885],{"class":1944,"line":1945},[1942,2874,2061],{"class":1948},[1942,2876,2065],{"class":2064},[1942,2878,2069],{"class":2068},[1942,2880,2072],{"class":2068},[1942,2882,2075],{"class":1948},[1942,2884,2079],{"class":2078},[1942,2886,2082],{"class":1948},[1942,2888,2889,2891,2893,2895,2897],{"class":1944,"line":1952},[1942,2890,2375],{"class":2374},[1942,2892,2378],{"class":1948},[1942,2894,2381],{"class":2374},[1942,2896,2384],{"class":2078},[1942,2898,2899],{"class":1948},";\n",[1942,2901,2902],{"class":1944,"line":1959},[1942,2903,1956],{"emptyLinePlaceholder":1955},[1942,2905,2906,2908,2910,2912,2914,2917,2919,2922,2925,2927,2929,2931,2933],{"class":1944,"line":1969},[1942,2907,2397],{"class":2374},[1942,2909,2401],{"class":2400},[1942,2911,2404],{"class":2374},[1942,2913,2407],{"class":2068},[1942,2915,2916],{"class":1948},"\u003C{ ",[1942,2918,2828],{"class":1962},[1942,2920,2921],{"class":2374},":",[1942,2923,2924],{"class":2400}," string",[1942,2926,2387],{"class":1948},[1942,2928,2824],{"class":1962},[1942,2930,2921],{"class":2374},[1942,2932,2924],{"class":2400},[1942,2934,2935],{"class":1948}," }>();\n",[1942,2937,2938],{"class":1944,"line":1977},[1942,2939,1956],{"emptyLinePlaceholder":1955},[1942,2941,2942,2944,2946,2948,2950],{"class":1944,"line":1985},[1942,2943,2397],{"class":2374},[1942,2945,2448],{"class":2400},[1942,2947,2404],{"class":2374},[1942,2949,2453],{"class":2068},[1942,2951,2952],{"class":1948},"\u003C{\n",[1942,2954,2955,2958,2960,2962],{"class":1944,"line":1993},[1942,2956,2957],{"class":1962},"    id",[1942,2959,2473],{"class":2374},[1942,2961,2924],{"class":2400},[1942,2963,2899],{"class":1948},[1942,2965,2966,2968,2970,2973],{"class":1944,"line":2001},[1942,2967,2470],{"class":1962},[1942,2969,2473],{"class":2374},[1942,2971,2972],{"class":2400}," number",[1942,2974,2899],{"class":1948},[1942,2976,2977,2979,2981,2983],{"class":1944,"line":2156},[1942,2978,2482],{"class":1962},[1942,2980,2473],{"class":2374},[1942,2982,2924],{"class":2400},[1942,2984,2899],{"class":1948},[1942,2986,2987],{"class":1944,"line":2178},[1942,2988,2989],{"class":1948},"}>({});\n",[1942,2991,2992],{"class":1944,"line":2199},[1942,2993,1956],{"emptyLinePlaceholder":1955},[1942,2995,2997,2999,3002,3004],{"class":2996,"line":2209},[1944,2370,2371],[1942,2998,2397],{"class":2374},[1942,3000,3001],{"class":2400}," ratingOptions",[1942,3003,2404],{"class":2374},[1942,3005,3006],{"class":1948}," [ ",[1942,3008,3010,3013,3016,3019,3022,3025,3028],{"class":3009,"line":2219},[1944,2370,2371],[1942,3011,3012],{"class":1948},"    { label: ",[1942,3014,3015],{"class":2078},"'Worst Doc Ever 🗑️'",[1942,3017,3018],{"class":1948},", value: ",[1942,3020,3021],{"class":2400},"1",[1942,3023,3024],{"class":1948},", message: ",[1942,3026,3027],{"class":2078},"'Woof! 🤦‍♂️ Sorry about that. How do we fix it?'",[1942,3029,3030],{"class":1948}," }, ",[1942,3032,3034,3036,3039,3041,3044,3046,3049],{"class":3033,"line":2234},[1944,2370,2371],[1942,3035,3012],{"class":1948},[1942,3037,3038],{"class":2078},"'Not Helpful 😡'",[1942,3040,3018],{"class":1948},[1942,3042,3043],{"class":2400},"2",[1942,3045,3024],{"class":1948},[1942,3047,3048],{"class":2078},"'🧐 Help us do better. How can we improve this article?'",[1942,3050,3030],{"class":1948},[1942,3052,3054,3056,3059,3061,3064,3066,3069],{"class":3053,"line":2240},[1944,2370,2371],[1942,3055,3012],{"class":1948},[1942,3057,3058],{"class":2078},"'Helpful 😃'",[1942,3060,3018],{"class":1948},[1942,3062,3063],{"class":2400},"3",[1942,3065,3024],{"class":1948},[1942,3067,3068],{"class":2078},"'Nice! 👍 Anything we can improve upon?'",[1942,3070,3030],{"class":1948},[1942,3072,3074,3076,3079,3081,3084,3086,3089],{"class":3073,"line":2249},[1944,2370,2371],[1942,3075,3012],{"class":1948},[1942,3077,3078],{"class":2078},"'Super Helpful 🤩'",[1942,3080,3018],{"class":1948},[1942,3082,3083],{"class":2400},"4",[1942,3085,3024],{"class":1948},[1942,3087,3088],{"class":2078},"`Awesome! The whole team is rejoicing in celebration! 🥳🎉🎊 Anything you'd like to say to them?`",[1942,3090,3030],{"class":1948},[1942,3092,3094],{"class":3093,"line":2264},[1944,2370,2371],[1942,3095,3096],{"class":1948},"]; ",[1942,3098,3099],{"class":1944,"line":2270},[1942,3100,1956],{"emptyLinePlaceholder":1955},[1942,3102,3104,3107,3110,3112,3115,3117,3119],{"class":3103,"line":2279},[1944,2370,2371],[1942,3105,3106],{"class":2374},"function",[1942,3108,3109],{"class":2068}," getRatingOption",[1942,3111,2517],{"class":1948},[1942,3113,3114],{"class":1962},"rating",[1942,3116,2921],{"class":2374},[1942,3118,2972],{"class":2400},[1942,3120,3121],{"class":1948},") { ",[1942,3123,3125,3128,3131,3134,3137,3140,3143,3146,3149,3152],{"class":3124,"line":2289},[1944,2370,2371],[1942,3126,3127],{"class":2374},"    return",[1942,3129,3130],{"class":1948}," ratingOptions.",[1942,3132,3133],{"class":2068},"find",[1942,3135,3136],{"class":1948},"((",[1942,3138,3139],{"class":1962},"option",[1942,3141,3142],{"class":1948},") ",[1942,3144,3145],{"class":2374},"=>",[1942,3147,3148],{"class":1948}," option.value ",[1942,3150,3151],{"class":2374},"===",[1942,3153,3154],{"class":1948}," rating); ",[1942,3156,3158],{"class":3157,"line":2298},[1944,2370,2371],[1942,3159,3160],{"class":1948},"} ",[1942,3162,3163,3165,3167],{"class":1944,"line":2303},[1942,3164,2087],{"class":1948},[1942,3166,2065],{"class":2064},[1942,3168,2082],{"class":1948},[1942,3170,3171],{"class":1944,"line":2316},[1942,3172,1956],{"emptyLinePlaceholder":1955},[1942,3174,3175,3177,3179],{"class":1944,"line":2610},[1942,3176,2061],{"class":1948},[1942,3178,2102],{"class":2064},[1942,3180,2082],{"class":1948},[1942,3182,3183,3185,3187,3189,3191,3193],{"class":1944,"line":2629},[1942,3184,2109],{"class":1948},[1942,3186,2112],{"class":2064},[1942,3188,2115],{"class":2068},[1942,3190,2075],{"class":1948},[1942,3192,2120],{"class":2078},[1942,3194,2082],{"class":1948},[1942,3196,3197,3199,3201,3203,3205,3207,3209,3211,3213],{"class":1944,"line":2648},[1942,3198,2127],{"class":1948},[1942,3200,2112],{"class":2064},[1942,3202,2581],{"class":2068},[1942,3204,2075],{"class":1948},[1942,3206,2586],{"class":2078},[1942,3208,2115],{"class":2068},[1942,3210,2075],{"class":1948},[1942,3212,2136],{"class":2078},[1942,3214,2082],{"class":1948},[1942,3216,3217],{"class":1944,"line":2657},[1942,3218,2144],{"class":2143},[1942,3220,3221,3223,3225],{"class":1944,"line":2666},[1942,3222,2149],{"class":1948},[1942,3224,2112],{"class":2064},[1942,3226,2082],{"class":1948},[1942,3228,3229,3231,3233,3235,3237,3239,3241,3243],{"class":1944,"line":2681},[1942,3230,2159],{"class":1948},[1942,3232,1840],{"class":2064},[1942,3234,2115],{"class":2068},[1942,3236,2075],{"class":1948},[1942,3238,2168],{"class":2078},[1942,3240,2171],{"class":1948},[1942,3242,1840],{"class":2064},[1942,3244,2082],{"class":1948},[1942,3246,3247,3249,3251,3253,3255,3257,3259,3261],{"class":1944,"line":2704},[1942,3248,2159],{"class":1948},[1942,3250,1840],{"class":2064},[1942,3252,2115],{"class":2068},[1942,3254,2075],{"class":1948},[1942,3256,2189],{"class":2078},[1942,3258,2192],{"class":1948},[1942,3260,1840],{"class":2064},[1942,3262,2082],{"class":1948},[1942,3264,3265,3267,3269],{"class":1944,"line":2709},[1942,3266,2202],{"class":1948},[1942,3268,2112],{"class":2064},[1942,3270,2082],{"class":1948},[1942,3272,3273,3275,3277,3279,3281,3284],{"class":1944,"line":2718},[1942,3274,2149],{"class":1948},[1942,3276,2112],{"class":2064},[1942,3278,2115],{"class":2068},[1942,3280,2075],{"class":1948},[1942,3282,3283],{"class":2078},"\"button-container\"",[1942,3285,2595],{"class":1948},[1942,3287,3288],{"class":1944,"line":2733},[1942,3289,3290],{"class":2143},"                    \u003C!-- We'll add a function for handling button clicks while adding our submission logic -->\n",[1942,3292,3293,3296,3299,3302,3304,3307,3310,3312,3315,3317,3319,3322],{"class":1944,"line":2751},[1942,3294,3295],{"class":1948},"                    \u003C",[1942,3297,3298],{"class":2064},"button",[1942,3300,3301],{"class":2068}," v-for",[1942,3303,2075],{"class":1948},[1942,3305,3306],{"class":2078},"\"item in ratingOptions\"",[1942,3308,3309],{"class":2068}," :key",[1942,3311,2075],{"class":1948},[1942,3313,3314],{"class":2078},"\"item.value\"",[1942,3316,2115],{"class":2068},[1942,3318,2075],{"class":1948},[1942,3320,3321],{"class":2078},"\"btn\"",[1942,3323,2595],{"class":1948},[1942,3325,3326,3329,3331,3334,3336],{"class":1944,"line":2756},[1942,3327,3328],{"class":1948},"                        \u003C",[1942,3330,1942],{"class":2064},[1942,3332,3333],{"class":1948},">{{ item.label }}\u003C/",[1942,3335,1942],{"class":2064},[1942,3337,2595],{"class":1948},[1942,3339,3340,3343,3345],{"class":1944,"line":2765},[1942,3341,3342],{"class":1948},"                    \u003C/",[1942,3344,3298],{"class":2064},[1942,3346,2595],{"class":1948},[1942,3348,3349,3351,3353],{"class":1944,"line":2774},[1942,3350,2202],{"class":1948},[1942,3352,2112],{"class":2064},[1942,3354,2595],{"class":1948},[1942,3356,3357,3359,3361],{"class":1944,"line":2783},[1942,3358,2212],{"class":1948},[1942,3360,2112],{"class":2064},[1942,3362,2082],{"class":1948},[1942,3364,3365,3367,3369,3371,3373,3375,3377,3379,3381],{"class":1944,"line":2788},[1942,3366,2127],{"class":1948},[1942,3368,2112],{"class":2064},[1942,3370,2688],{"class":2068},[1942,3372,2075],{"class":1948},[1942,3374,2693],{"class":2078},[1942,3376,2115],{"class":2068},[1942,3378,2075],{"class":1948},[1942,3380,2136],{"class":2078},[1942,3382,2082],{"class":1948},[1942,3384,3385],{"class":1944,"line":2799},[1942,3386,2237],{"class":2143},[1942,3388,3390,3392,3394],{"class":1944,"line":3389},41,[1942,3391,2212],{"class":1948},[1942,3393,2112],{"class":2064},[1942,3395,2082],{"class":1948},[1942,3397,3399,3401,3403,3405,3407,3409,3411],{"class":1944,"line":3398},42,[1942,3400,2127],{"class":1948},[1942,3402,2112],{"class":2064},[1942,3404,2740],{"class":2068},[1942,3406,2115],{"class":2068},[1942,3408,2075],{"class":1948},[1942,3410,2136],{"class":2078},[1942,3412,2082],{"class":1948},[1942,3414,3416],{"class":1944,"line":3415},43,[1942,3417,2267],{"class":2143},[1942,3419,3421,3423,3425],{"class":1944,"line":3420},44,[1942,3422,2212],{"class":1948},[1942,3424,2112],{"class":2064},[1942,3426,2082],{"class":1948},[1942,3428,3430,3432,3434],{"class":1944,"line":3429},45,[1942,3431,2282],{"class":1948},[1942,3433,2112],{"class":2064},[1942,3435,2082],{"class":1948},[1942,3437,3439,3441,3443],{"class":1944,"line":3438},46,[1942,3440,2087],{"class":1948},[1942,3442,2102],{"class":2064},[1942,3444,2082],{"class":1948},[1840,3446,3447,3448,3451,3452,3455,3456,3459],{},"The rating options will be an array of objects that have a visible ",[1929,3449,3450],{},"label",", a corresponding ",[1929,3453,3454],{},"value"," of 1-4, and a dynamic",[1929,3457,3458],{},"message"," that we’ll display to encourage the user to leave comments after selecting a rating.",[1840,3461,3462],{},"We’ll also create a small helper function to return the rating object based when passing a number value. This will come in handy in the second step because we’re going to display the rating the user chose.",[1840,3464,3465,3466,3469,3470,3473],{},"Add a new div to Step 1 below the feedback prompt that will contain our rating options. Inside that, we’ll use ",[1929,3467,3468],{},"v-for"," to loop through the ",[1929,3471,3472],{},"ratingOptions"," array and render the individual buttons.",[2035,3475,3477],{"id":3476},"asking-for-comments","Asking for Comments",[1934,3479,3481],{"className":2052,"code":3480,"language":2054,"meta":24,"style":24},"\u003Ctemplate>\n    \u003Cdiv class=\"wrapper\">\n        \u003Cdiv v-if=\"!feedback.rating\" class=\"step\">\n            \u003C!-- Step 1. Show Rating Buttons -->\n            \u003Cdiv>\n                \u003Cp class=\"desc\">How can we improve?\u003C/p>\n                \u003Cp class=\"heading\">How helpful was this article?\u003C/p>\n            \u003C/div>\n            \u003Cdiv class=\"button-container\">\n                    \u003Cbutton v-for=\"item in ratingOptions\" :key=\"item.value\" class=\"btn\">\n                        \u003Cspan>{{ item.label }}\u003C/span>\n                    \u003C/button>\n            \u003C/div>\n        \u003C/div>\n        \u003Cdiv v-else-if=\"feedback.rating && !success\" class=\"step\">\n            \u003C!-- Step 2. Ask for Comments -->\n                \u003Cdiv> // [!code ++]\n                    \u003Cp class=\"desc\">This article is\u003C/p> // [!code ++]\n                    \u003Cdiv> // [!code ++]\n                        \u003Cspan>{{ getRatingOption(feedback.rating)?.label }}\u003C/span> // [!code ++]\n                        \u003Cbutton class=\"btn\" @click=\"feedback.rating = undefined\"> // [!code ++]\n                            ❌ // [!code ++]\n                        \u003C/button> // [!code ++]\n                    \u003C/div> // [!code ++]\n                \u003C/div> // [!code ++]\n                \u003Cp class=\"heading\">{{ getRatingOption(feedback.rating)?.message }}\u003C/p> // [!code ++]\n                \u003Ctextarea v-model=\"feedback.comments\" autofocus class=\"input\" /> // [!code ++]\n                \u003Cbutton class=\"btn btn-primary\" :disabled=\"!feedback.comments\"> // [!code ++]\n                    Send Us Your Feedback // [!code ++]\n                \u003C/button> // [!code ++]\n        \u003C/div>\n        \u003Cdiv v-else class=\"step\">\n            \u003C!-- Step 3. Show Success Message -->\n            \u003Cp class=\"heading\">Thanks for your feedback!\u003C/p> // [!code ++]\n        \u003C/div>\n    \u003C/div>\n\u003C/template>\n",[1929,3482,3483,3491,3505,3525,3529,3537,3555,3573,3581,3595,3621,3633,3641,3649,3657,3677,3681,3689,3708,3716,3729,3751,3756,3765,3773,3782,3801,3832,3855,3860,3868,3876,3892,3896,3915,3923,3931],{"__ignoreMap":24},[1942,3484,3485,3487,3489],{"class":1944,"line":1945},[1942,3486,2061],{"class":1948},[1942,3488,2102],{"class":2064},[1942,3490,2082],{"class":1948},[1942,3492,3493,3495,3497,3499,3501,3503],{"class":1944,"line":1952},[1942,3494,2109],{"class":1948},[1942,3496,2112],{"class":2064},[1942,3498,2115],{"class":2068},[1942,3500,2075],{"class":1948},[1942,3502,2120],{"class":2078},[1942,3504,2082],{"class":1948},[1942,3506,3507,3509,3511,3513,3515,3517,3519,3521,3523],{"class":1944,"line":1959},[1942,3508,2127],{"class":1948},[1942,3510,2112],{"class":2064},[1942,3512,2581],{"class":2068},[1942,3514,2075],{"class":1948},[1942,3516,2586],{"class":2078},[1942,3518,2115],{"class":2068},[1942,3520,2075],{"class":1948},[1942,3522,2136],{"class":2078},[1942,3524,2082],{"class":1948},[1942,3526,3527],{"class":1944,"line":1969},[1942,3528,2144],{"class":2143},[1942,3530,3531,3533,3535],{"class":1944,"line":1977},[1942,3532,2149],{"class":1948},[1942,3534,2112],{"class":2064},[1942,3536,2082],{"class":1948},[1942,3538,3539,3541,3543,3545,3547,3549,3551,3553],{"class":1944,"line":1985},[1942,3540,2159],{"class":1948},[1942,3542,1840],{"class":2064},[1942,3544,2115],{"class":2068},[1942,3546,2075],{"class":1948},[1942,3548,2168],{"class":2078},[1942,3550,2171],{"class":1948},[1942,3552,1840],{"class":2064},[1942,3554,2082],{"class":1948},[1942,3556,3557,3559,3561,3563,3565,3567,3569,3571],{"class":1944,"line":1993},[1942,3558,2159],{"class":1948},[1942,3560,1840],{"class":2064},[1942,3562,2115],{"class":2068},[1942,3564,2075],{"class":1948},[1942,3566,2189],{"class":2078},[1942,3568,2192],{"class":1948},[1942,3570,1840],{"class":2064},[1942,3572,2082],{"class":1948},[1942,3574,3575,3577,3579],{"class":1944,"line":2001},[1942,3576,2202],{"class":1948},[1942,3578,2112],{"class":2064},[1942,3580,2082],{"class":1948},[1942,3582,3583,3585,3587,3589,3591,3593],{"class":1944,"line":2156},[1942,3584,2149],{"class":1948},[1942,3586,2112],{"class":2064},[1942,3588,2115],{"class":2068},[1942,3590,2075],{"class":1948},[1942,3592,3283],{"class":2078},[1942,3594,2082],{"class":1948},[1942,3596,3597,3599,3601,3603,3605,3607,3609,3611,3613,3615,3617,3619],{"class":1944,"line":2178},[1942,3598,3295],{"class":1948},[1942,3600,3298],{"class":2064},[1942,3602,3301],{"class":2068},[1942,3604,2075],{"class":1948},[1942,3606,3306],{"class":2078},[1942,3608,3309],{"class":2068},[1942,3610,2075],{"class":1948},[1942,3612,3314],{"class":2078},[1942,3614,2115],{"class":2068},[1942,3616,2075],{"class":1948},[1942,3618,3321],{"class":2078},[1942,3620,2082],{"class":1948},[1942,3622,3623,3625,3627,3629,3631],{"class":1944,"line":2199},[1942,3624,3328],{"class":1948},[1942,3626,1942],{"class":2064},[1942,3628,3333],{"class":1948},[1942,3630,1942],{"class":2064},[1942,3632,2082],{"class":1948},[1942,3634,3635,3637,3639],{"class":1944,"line":2209},[1942,3636,3342],{"class":1948},[1942,3638,3298],{"class":2064},[1942,3640,2082],{"class":1948},[1942,3642,3643,3645,3647],{"class":1944,"line":2219},[1942,3644,2202],{"class":1948},[1942,3646,2112],{"class":2064},[1942,3648,2082],{"class":1948},[1942,3650,3651,3653,3655],{"class":1944,"line":2234},[1942,3652,2212],{"class":1948},[1942,3654,2112],{"class":2064},[1942,3656,2082],{"class":1948},[1942,3658,3659,3661,3663,3665,3667,3669,3671,3673,3675],{"class":1944,"line":2240},[1942,3660,2127],{"class":1948},[1942,3662,2112],{"class":2064},[1942,3664,2688],{"class":2068},[1942,3666,2075],{"class":1948},[1942,3668,2693],{"class":2078},[1942,3670,2115],{"class":2068},[1942,3672,2075],{"class":1948},[1942,3674,2136],{"class":2078},[1942,3676,2082],{"class":1948},[1942,3678,3679],{"class":1944,"line":2249},[1942,3680,2237],{"class":2143},[1942,3682,3683,3685,3687],{"class":1944,"line":2264},[1942,3684,2159],{"class":1948},[1942,3686,2112],{"class":2064},[1942,3688,2595],{"class":1948},[1942,3690,3691,3693,3695,3697,3699,3701,3704,3706],{"class":1944,"line":2270},[1942,3692,3295],{"class":1948},[1942,3694,1840],{"class":2064},[1942,3696,2115],{"class":2068},[1942,3698,2075],{"class":1948},[1942,3700,2168],{"class":2078},[1942,3702,3703],{"class":1948},">This article is\u003C/",[1942,3705,1840],{"class":2064},[1942,3707,2595],{"class":1948},[1942,3709,3710,3712,3714],{"class":1944,"line":2279},[1942,3711,3295],{"class":1948},[1942,3713,2112],{"class":2064},[1942,3715,2595],{"class":1948},[1942,3717,3718,3720,3722,3725,3727],{"class":1944,"line":2289},[1942,3719,3328],{"class":1948},[1942,3721,1942],{"class":2064},[1942,3723,3724],{"class":1948},">{{ getRatingOption(feedback.rating)?.label }}\u003C/",[1942,3726,1942],{"class":2064},[1942,3728,2595],{"class":1948},[1942,3730,3731,3733,3735,3737,3739,3741,3744,3746,3749],{"class":1944,"line":2298},[1942,3732,3328],{"class":1948},[1942,3734,3298],{"class":2064},[1942,3736,2115],{"class":2068},[1942,3738,2075],{"class":1948},[1942,3740,3321],{"class":2078},[1942,3742,3743],{"class":2068}," @click",[1942,3745,2075],{"class":1948},[1942,3747,3748],{"class":2078},"\"feedback.rating = undefined\"",[1942,3750,2595],{"class":1948},[1942,3752,3753],{"class":1944,"line":2303},[1942,3754,3755],{"class":1948},"                            ❌ // [!code ++]\n",[1942,3757,3758,3761,3763],{"class":1944,"line":2316},[1942,3759,3760],{"class":1948},"                        \u003C/",[1942,3762,3298],{"class":2064},[1942,3764,2595],{"class":1948},[1942,3766,3767,3769,3771],{"class":1944,"line":2610},[1942,3768,3342],{"class":1948},[1942,3770,2112],{"class":2064},[1942,3772,2595],{"class":1948},[1942,3774,3775,3778,3780],{"class":1944,"line":2629},[1942,3776,3777],{"class":1948},"                \u003C/",[1942,3779,2112],{"class":2064},[1942,3781,2595],{"class":1948},[1942,3783,3784,3786,3788,3790,3792,3794,3797,3799],{"class":1944,"line":2648},[1942,3785,2159],{"class":1948},[1942,3787,1840],{"class":2064},[1942,3789,2115],{"class":2068},[1942,3791,2075],{"class":1948},[1942,3793,2189],{"class":2078},[1942,3795,3796],{"class":1948},">{{ getRatingOption(feedback.rating)?.message }}\u003C/",[1942,3798,1840],{"class":2064},[1942,3800,2595],{"class":1948},[1942,3802,3803,3805,3808,3811,3813,3816,3819,3821,3823,3826,3830],{"class":1944,"line":2657},[1942,3804,2159],{"class":1948},[1942,3806,3807],{"class":2064},"textarea",[1942,3809,3810],{"class":2068}," v-model",[1942,3812,2075],{"class":1948},[1942,3814,3815],{"class":2078},"\"feedback.comments\"",[1942,3817,3818],{"class":2068}," autofocus",[1942,3820,2115],{"class":2068},[1942,3822,2075],{"class":1948},[1942,3824,3825],{"class":2078},"\"input\"",[1942,3827,3829],{"class":3828},"sPrNH"," /",[1942,3831,2595],{"class":1948},[1942,3833,3834,3836,3838,3840,3842,3845,3848,3850,3853],{"class":1944,"line":2666},[1942,3835,2159],{"class":1948},[1942,3837,3298],{"class":2064},[1942,3839,2115],{"class":2068},[1942,3841,2075],{"class":1948},[1942,3843,3844],{"class":2078},"\"btn btn-primary\"",[1942,3846,3847],{"class":2068}," :disabled",[1942,3849,2075],{"class":1948},[1942,3851,3852],{"class":2078},"\"!feedback.comments\"",[1942,3854,2595],{"class":1948},[1942,3856,3857],{"class":1944,"line":2681},[1942,3858,3859],{"class":1948},"                    Send Us Your Feedback // [!code ++]\n",[1942,3861,3862,3864,3866],{"class":1944,"line":2704},[1942,3863,3777],{"class":1948},[1942,3865,3298],{"class":2064},[1942,3867,2595],{"class":1948},[1942,3869,3870,3872,3874],{"class":1944,"line":2709},[1942,3871,2212],{"class":1948},[1942,3873,2112],{"class":2064},[1942,3875,2082],{"class":1948},[1942,3877,3878,3880,3882,3884,3886,3888,3890],{"class":1944,"line":2718},[1942,3879,2127],{"class":1948},[1942,3881,2112],{"class":2064},[1942,3883,2740],{"class":2068},[1942,3885,2115],{"class":2068},[1942,3887,2075],{"class":1948},[1942,3889,2136],{"class":2078},[1942,3891,2082],{"class":1948},[1942,3893,3894],{"class":1944,"line":2733},[1942,3895,2267],{"class":2143},[1942,3897,3898,3900,3902,3904,3906,3908,3911,3913],{"class":1944,"line":2751},[1942,3899,2149],{"class":1948},[1942,3901,1840],{"class":2064},[1942,3903,2115],{"class":2068},[1942,3905,2075],{"class":1948},[1942,3907,2189],{"class":2078},[1942,3909,3910],{"class":1948},">Thanks for your feedback!\u003C/",[1942,3912,1840],{"class":2064},[1942,3914,2595],{"class":1948},[1942,3916,3917,3919,3921],{"class":1944,"line":2756},[1942,3918,2212],{"class":1948},[1942,3920,2112],{"class":2064},[1942,3922,2082],{"class":1948},[1942,3924,3925,3927,3929],{"class":1944,"line":2765},[1942,3926,2282],{"class":1948},[1942,3928,2112],{"class":2064},[1942,3930,2082],{"class":1948},[1942,3932,3933,3935,3937],{"class":1944,"line":2774},[1942,3934,2087],{"class":1948},[1942,3936,2102],{"class":2064},[1942,3938,2082],{"class":1948},[1840,3940,3941,3942,3945],{},"In Step 2 of the process, we’re showing the user the rating they chose using our ",[1929,3943,3944],{},"getRatingOption"," helper function we created.",[1840,3947,3948,3949,3952,3953,3956,3957,3959],{},"To improve the user experience, we’ll also let users go back and choose a different rating in case they picked the wrong one by mistake. Whenever they click the close button we’ll set the ",[1929,3950,3951],{},"feedback.rating"," property to ",[1929,3954,3955],{},"undefined"," which will take the user back to Step 1 based on the ",[1929,3958,2849],{}," logic we created.",[1840,3961,3962],{},"Below that, we’ll show the proper message for the option they chose to encourage them to leave helpful comments in short form with a textarea input and a submit button.",[1840,3964,3965,3966,3969],{},"We’ll also prevent them from submitting from Step 2 when the comments are empty, so we pass the ",[1929,3967,3968],{},":disabled=\"!feedback.comments\""," prop to the button element.",[2035,3971,3973],{"id":3972},"adding-styling","Adding Styling",[1840,3975,3976],{},"Next, let’s add some basic styling.",[1934,3978,3980],{"className":2052,"code":3979,"language":2054,"meta":24,"style":24},"// ^^ Rest of ArticleFeedback.vue Component ^^\n\u003Cstyle scoped>\n\n.wrapper {\n    margin: 2rem 0;\n    padding: 1.5rem;\n    border: 1px solid rgba(60, 60, 67, .12);\n    border-radius: 8px;\n    background: #f6f6f7;\n}\n\n.step > * + * {\n    margin-top: 1rem;\n}\n\n.desc {\n    display: block;\n    line-height: 20px;\n    font-size: 12px;\n    font-weight: 500;\n    color: rgba(60, 60, 67, .75);\n}\n\n.heading {\n    font-size: 1.2rem;\n    font-weight: 700;\n}\n\n.button-container {\n    display: grid;\n    grid-gap: 0.5rem;\n}\n\n.btn {\n    border: 1px solid solid rgba(60, 60, 67, .12);\n    background-color: #ffffff;\n    border-radius: 8px;\n    transition: border-color 0.25s, background-color 0.25s;\n    display: inline-block;\n    font-size: 14px;\n    font-weight: 500;\n    line-height: 1.5;\n    margin: 0;\n    padding: 0.375rem 0.75rem;\n    text-align: center;\n    vertical-align: middle;\n    white-space: nowrap;\n}\n\n.btn:disabled {\n    opacity: 0.5;\n}\n\n.btn:hover {\n    border-color: #6644ff;\n}\n\n.btn-primary {\n    color: #fff;\n    background-color: #6644ff;\n    border-color: #6644ff;\n}\n\n.btn-primary:hover {\n    background-color: #4422dd;\n    border-color: #4422dd;\n}\n\n.input {\n    width: 100%;\n    height: 100px;\n    border: 1px solid #ccc;\n    border-radius: 4px;\n    padding: 0.375rem 0.75rem;\n}\n\n@media screen and (min-width: 768px) {\n    .button-container {\n        grid-template-columns: repeat(4, 1fr);\n    }\n}\n\u003C/style>\n",[1929,3981,3982,3987,3997,4001,4009,4027,4041,4081,4095,4107,4112,4116,4134,4147,4151,4155,4162,4174,4188,4202,4214,4243,4247,4251,4258,4271,4282,4286,4290,4297,4308,4322,4326,4330,4337,4371,4383,4395,4418,4429,4442,4452,4462,4473,4491,4503,4515,4528,4533,4538,4546,4558,4563,4568,4576,4589,4594,4599,4607,4619,4630,4641,4646,4651,4659,4671,4682,4687,4692,4700,4716,4730,4748,4761,4778,4783,4788,4816,4824,4848,4854,4859],{"__ignoreMap":24},[1942,3983,3984],{"class":1944,"line":1945},[1942,3985,3986],{"class":1948},"// ^^ Rest of ArticleFeedback.vue Component ^^\n",[1942,3988,3989,3991,3993,3995],{"class":1944,"line":1952},[1942,3990,2061],{"class":1948},[1942,3992,2308],{"class":2064},[1942,3994,2311],{"class":2068},[1942,3996,2082],{"class":1948},[1942,3998,3999],{"class":1944,"line":1959},[1942,4000,1956],{"emptyLinePlaceholder":1955},[1942,4002,4003,4006],{"class":1944,"line":1969},[1942,4004,4005],{"class":2068},".wrapper",[1942,4007,4008],{"class":1948}," {\n",[1942,4010,4011,4014,4017,4019,4022,4025],{"class":1944,"line":1977},[1942,4012,4013],{"class":2400},"    margin",[1942,4015,4016],{"class":1948},": ",[1942,4018,3043],{"class":2400},[1942,4020,4021],{"class":2374},"rem",[1942,4023,4024],{"class":2400}," 0",[1942,4026,2899],{"class":1948},[1942,4028,4029,4032,4034,4037,4039],{"class":1944,"line":1985},[1942,4030,4031],{"class":2400},"    padding",[1942,4033,4016],{"class":1948},[1942,4035,4036],{"class":2400},"1.5",[1942,4038,4021],{"class":2374},[1942,4040,2899],{"class":1948},[1942,4042,4043,4046,4048,4050,4053,4056,4059,4061,4064,4066,4068,4070,4073,4075,4078],{"class":1944,"line":1993},[1942,4044,4045],{"class":2400},"    border",[1942,4047,4016],{"class":1948},[1942,4049,3021],{"class":2400},[1942,4051,4052],{"class":2374},"px",[1942,4054,4055],{"class":2400}," solid",[1942,4057,4058],{"class":2400}," rgba",[1942,4060,2517],{"class":1948},[1942,4062,4063],{"class":2400},"60",[1942,4065,2850],{"class":1948},[1942,4067,4063],{"class":2400},[1942,4069,2850],{"class":1948},[1942,4071,4072],{"class":2400},"67",[1942,4074,2850],{"class":1948},[1942,4076,4077],{"class":2400},".12",[1942,4079,4080],{"class":1948},");\n",[1942,4082,4083,4086,4088,4091,4093],{"class":1944,"line":2001},[1942,4084,4085],{"class":2400},"    border-radius",[1942,4087,4016],{"class":1948},[1942,4089,4090],{"class":2400},"8",[1942,4092,4052],{"class":2374},[1942,4094,2899],{"class":1948},[1942,4096,4097,4100,4102,4105],{"class":1944,"line":2156},[1942,4098,4099],{"class":2400},"    background",[1942,4101,4016],{"class":1948},[1942,4103,4104],{"class":2400},"#f6f6f7",[1942,4106,2899],{"class":1948},[1942,4108,4109],{"class":1944,"line":2178},[1942,4110,4111],{"class":1948},"}\n",[1942,4113,4114],{"class":1944,"line":2199},[1942,4115,1956],{"emptyLinePlaceholder":1955},[1942,4117,4118,4121,4124,4127,4130,4132],{"class":1944,"line":2209},[1942,4119,4120],{"class":2068},".step",[1942,4122,4123],{"class":2374}," >",[1942,4125,4126],{"class":2064}," *",[1942,4128,4129],{"class":2374}," +",[1942,4131,4126],{"class":2064},[1942,4133,4008],{"class":1948},[1942,4135,4136,4139,4141,4143,4145],{"class":1944,"line":2219},[1942,4137,4138],{"class":2400},"    margin-top",[1942,4140,4016],{"class":1948},[1942,4142,3021],{"class":2400},[1942,4144,4021],{"class":2374},[1942,4146,2899],{"class":1948},[1942,4148,4149],{"class":1944,"line":2234},[1942,4150,4111],{"class":1948},[1942,4152,4153],{"class":1944,"line":2240},[1942,4154,1956],{"emptyLinePlaceholder":1955},[1942,4156,4157,4160],{"class":1944,"line":2249},[1942,4158,4159],{"class":2068},".desc",[1942,4161,4008],{"class":1948},[1942,4163,4164,4167,4169,4172],{"class":1944,"line":2264},[1942,4165,4166],{"class":2400},"    display",[1942,4168,4016],{"class":1948},[1942,4170,4171],{"class":2400},"block",[1942,4173,2899],{"class":1948},[1942,4175,4176,4179,4181,4184,4186],{"class":1944,"line":2270},[1942,4177,4178],{"class":2400},"    line-height",[1942,4180,4016],{"class":1948},[1942,4182,4183],{"class":2400},"20",[1942,4185,4052],{"class":2374},[1942,4187,2899],{"class":1948},[1942,4189,4190,4193,4195,4198,4200],{"class":1944,"line":2279},[1942,4191,4192],{"class":2400},"    font-size",[1942,4194,4016],{"class":1948},[1942,4196,4197],{"class":2400},"12",[1942,4199,4052],{"class":2374},[1942,4201,2899],{"class":1948},[1942,4203,4204,4207,4209,4212],{"class":1944,"line":2289},[1942,4205,4206],{"class":2400},"    font-weight",[1942,4208,4016],{"class":1948},[1942,4210,4211],{"class":2400},"500",[1942,4213,2899],{"class":1948},[1942,4215,4216,4219,4221,4224,4226,4228,4230,4232,4234,4236,4238,4241],{"class":1944,"line":2298},[1942,4217,4218],{"class":2400},"    color",[1942,4220,4016],{"class":1948},[1942,4222,4223],{"class":2400},"rgba",[1942,4225,2517],{"class":1948},[1942,4227,4063],{"class":2400},[1942,4229,2850],{"class":1948},[1942,4231,4063],{"class":2400},[1942,4233,2850],{"class":1948},[1942,4235,4072],{"class":2400},[1942,4237,2850],{"class":1948},[1942,4239,4240],{"class":2400},".75",[1942,4242,4080],{"class":1948},[1942,4244,4245],{"class":1944,"line":2303},[1942,4246,4111],{"class":1948},[1942,4248,4249],{"class":1944,"line":2316},[1942,4250,1956],{"emptyLinePlaceholder":1955},[1942,4252,4253,4256],{"class":1944,"line":2610},[1942,4254,4255],{"class":2068},".heading",[1942,4257,4008],{"class":1948},[1942,4259,4260,4262,4264,4267,4269],{"class":1944,"line":2629},[1942,4261,4192],{"class":2400},[1942,4263,4016],{"class":1948},[1942,4265,4266],{"class":2400},"1.2",[1942,4268,4021],{"class":2374},[1942,4270,2899],{"class":1948},[1942,4272,4273,4275,4277,4280],{"class":1944,"line":2648},[1942,4274,4206],{"class":2400},[1942,4276,4016],{"class":1948},[1942,4278,4279],{"class":2400},"700",[1942,4281,2899],{"class":1948},[1942,4283,4284],{"class":1944,"line":2657},[1942,4285,4111],{"class":1948},[1942,4287,4288],{"class":1944,"line":2666},[1942,4289,1956],{"emptyLinePlaceholder":1955},[1942,4291,4292,4295],{"class":1944,"line":2681},[1942,4293,4294],{"class":2068},".button-container",[1942,4296,4008],{"class":1948},[1942,4298,4299,4301,4303,4306],{"class":1944,"line":2704},[1942,4300,4166],{"class":2400},[1942,4302,4016],{"class":1948},[1942,4304,4305],{"class":2400},"grid",[1942,4307,2899],{"class":1948},[1942,4309,4310,4313,4315,4318,4320],{"class":1944,"line":2709},[1942,4311,4312],{"class":2400},"    grid-gap",[1942,4314,4016],{"class":1948},[1942,4316,4317],{"class":2400},"0.5",[1942,4319,4021],{"class":2374},[1942,4321,2899],{"class":1948},[1942,4323,4324],{"class":1944,"line":2718},[1942,4325,4111],{"class":1948},[1942,4327,4328],{"class":1944,"line":2733},[1942,4329,1956],{"emptyLinePlaceholder":1955},[1942,4331,4332,4335],{"class":1944,"line":2751},[1942,4333,4334],{"class":2068},".btn",[1942,4336,4008],{"class":1948},[1942,4338,4339,4341,4343,4345,4347,4349,4351,4353,4355,4357,4359,4361,4363,4365,4367,4369],{"class":1944,"line":2756},[1942,4340,4045],{"class":2400},[1942,4342,4016],{"class":1948},[1942,4344,3021],{"class":2400},[1942,4346,4052],{"class":2374},[1942,4348,4055],{"class":2400},[1942,4350,4055],{"class":2400},[1942,4352,4058],{"class":2400},[1942,4354,2517],{"class":1948},[1942,4356,4063],{"class":2400},[1942,4358,2850],{"class":1948},[1942,4360,4063],{"class":2400},[1942,4362,2850],{"class":1948},[1942,4364,4072],{"class":2400},[1942,4366,2850],{"class":1948},[1942,4368,4077],{"class":2400},[1942,4370,4080],{"class":1948},[1942,4372,4373,4376,4378,4381],{"class":1944,"line":2765},[1942,4374,4375],{"class":2400},"    background-color",[1942,4377,4016],{"class":1948},[1942,4379,4380],{"class":2400},"#ffffff",[1942,4382,2899],{"class":1948},[1942,4384,4385,4387,4389,4391,4393],{"class":1944,"line":2774},[1942,4386,4085],{"class":2400},[1942,4388,4016],{"class":1948},[1942,4390,4090],{"class":2400},[1942,4392,4052],{"class":2374},[1942,4394,2899],{"class":1948},[1942,4396,4397,4400,4403,4406,4409,4412,4414,4416],{"class":1944,"line":2783},[1942,4398,4399],{"class":2400},"    transition",[1942,4401,4402],{"class":1948},": border-color ",[1942,4404,4405],{"class":2400},"0.25",[1942,4407,4408],{"class":2374},"s",[1942,4410,4411],{"class":1948},", background-color ",[1942,4413,4405],{"class":2400},[1942,4415,4408],{"class":2374},[1942,4417,2899],{"class":1948},[1942,4419,4420,4422,4424,4427],{"class":1944,"line":2788},[1942,4421,4166],{"class":2400},[1942,4423,4016],{"class":1948},[1942,4425,4426],{"class":2400},"inline-block",[1942,4428,2899],{"class":1948},[1942,4430,4431,4433,4435,4438,4440],{"class":1944,"line":2799},[1942,4432,4192],{"class":2400},[1942,4434,4016],{"class":1948},[1942,4436,4437],{"class":2400},"14",[1942,4439,4052],{"class":2374},[1942,4441,2899],{"class":1948},[1942,4443,4444,4446,4448,4450],{"class":1944,"line":3389},[1942,4445,4206],{"class":2400},[1942,4447,4016],{"class":1948},[1942,4449,4211],{"class":2400},[1942,4451,2899],{"class":1948},[1942,4453,4454,4456,4458,4460],{"class":1944,"line":3398},[1942,4455,4178],{"class":2400},[1942,4457,4016],{"class":1948},[1942,4459,4036],{"class":2400},[1942,4461,2899],{"class":1948},[1942,4463,4464,4466,4468,4471],{"class":1944,"line":3415},[1942,4465,4013],{"class":2400},[1942,4467,4016],{"class":1948},[1942,4469,4470],{"class":2400},"0",[1942,4472,2899],{"class":1948},[1942,4474,4475,4477,4479,4482,4484,4487,4489],{"class":1944,"line":3420},[1942,4476,4031],{"class":2400},[1942,4478,4016],{"class":1948},[1942,4480,4481],{"class":2400},"0.375",[1942,4483,4021],{"class":2374},[1942,4485,4486],{"class":2400}," 0.75",[1942,4488,4021],{"class":2374},[1942,4490,2899],{"class":1948},[1942,4492,4493,4496,4498,4501],{"class":1944,"line":3429},[1942,4494,4495],{"class":2400},"    text-align",[1942,4497,4016],{"class":1948},[1942,4499,4500],{"class":2400},"center",[1942,4502,2899],{"class":1948},[1942,4504,4505,4508,4510,4513],{"class":1944,"line":3438},[1942,4506,4507],{"class":2400},"    vertical-align",[1942,4509,4016],{"class":1948},[1942,4511,4512],{"class":2400},"middle",[1942,4514,2899],{"class":1948},[1942,4516,4518,4521,4523,4526],{"class":1944,"line":4517},47,[1942,4519,4520],{"class":2400},"    white-space",[1942,4522,4016],{"class":1948},[1942,4524,4525],{"class":2400},"nowrap",[1942,4527,2899],{"class":1948},[1942,4529,4531],{"class":1944,"line":4530},48,[1942,4532,4111],{"class":1948},[1942,4534,4536],{"class":1944,"line":4535},49,[1942,4537,1956],{"emptyLinePlaceholder":1955},[1942,4539,4541,4544],{"class":1944,"line":4540},50,[1942,4542,4543],{"class":2068},".btn:disabled",[1942,4545,4008],{"class":1948},[1942,4547,4549,4552,4554,4556],{"class":1944,"line":4548},51,[1942,4550,4551],{"class":2400},"    opacity",[1942,4553,4016],{"class":1948},[1942,4555,4317],{"class":2400},[1942,4557,2899],{"class":1948},[1942,4559,4561],{"class":1944,"line":4560},52,[1942,4562,4111],{"class":1948},[1942,4564,4566],{"class":1944,"line":4565},53,[1942,4567,1956],{"emptyLinePlaceholder":1955},[1942,4569,4571,4574],{"class":1944,"line":4570},54,[1942,4572,4573],{"class":2068},".btn:hover",[1942,4575,4008],{"class":1948},[1942,4577,4579,4582,4584,4587],{"class":1944,"line":4578},55,[1942,4580,4581],{"class":2400},"    border-color",[1942,4583,4016],{"class":1948},[1942,4585,4586],{"class":2400},"#6644ff",[1942,4588,2899],{"class":1948},[1942,4590,4592],{"class":1944,"line":4591},56,[1942,4593,4111],{"class":1948},[1942,4595,4597],{"class":1944,"line":4596},57,[1942,4598,1956],{"emptyLinePlaceholder":1955},[1942,4600,4602,4605],{"class":1944,"line":4601},58,[1942,4603,4604],{"class":2068},".btn-primary",[1942,4606,4008],{"class":1948},[1942,4608,4610,4612,4614,4617],{"class":1944,"line":4609},59,[1942,4611,4218],{"class":2400},[1942,4613,4016],{"class":1948},[1942,4615,4616],{"class":2400},"#fff",[1942,4618,2899],{"class":1948},[1942,4620,4622,4624,4626,4628],{"class":1944,"line":4621},60,[1942,4623,4375],{"class":2400},[1942,4625,4016],{"class":1948},[1942,4627,4586],{"class":2400},[1942,4629,2899],{"class":1948},[1942,4631,4633,4635,4637,4639],{"class":1944,"line":4632},61,[1942,4634,4581],{"class":2400},[1942,4636,4016],{"class":1948},[1942,4638,4586],{"class":2400},[1942,4640,2899],{"class":1948},[1942,4642,4644],{"class":1944,"line":4643},62,[1942,4645,4111],{"class":1948},[1942,4647,4649],{"class":1944,"line":4648},63,[1942,4650,1956],{"emptyLinePlaceholder":1955},[1942,4652,4654,4657],{"class":1944,"line":4653},64,[1942,4655,4656],{"class":2068},".btn-primary:hover",[1942,4658,4008],{"class":1948},[1942,4660,4662,4664,4666,4669],{"class":1944,"line":4661},65,[1942,4663,4375],{"class":2400},[1942,4665,4016],{"class":1948},[1942,4667,4668],{"class":2400},"#4422dd",[1942,4670,2899],{"class":1948},[1942,4672,4674,4676,4678,4680],{"class":1944,"line":4673},66,[1942,4675,4581],{"class":2400},[1942,4677,4016],{"class":1948},[1942,4679,4668],{"class":2400},[1942,4681,2899],{"class":1948},[1942,4683,4685],{"class":1944,"line":4684},67,[1942,4686,4111],{"class":1948},[1942,4688,4690],{"class":1944,"line":4689},68,[1942,4691,1956],{"emptyLinePlaceholder":1955},[1942,4693,4695,4698],{"class":1944,"line":4694},69,[1942,4696,4697],{"class":2068},".input",[1942,4699,4008],{"class":1948},[1942,4701,4703,4706,4708,4711,4714],{"class":1944,"line":4702},70,[1942,4704,4705],{"class":2400},"    width",[1942,4707,4016],{"class":1948},[1942,4709,4710],{"class":2400},"100",[1942,4712,4713],{"class":2374},"%",[1942,4715,2899],{"class":1948},[1942,4717,4719,4722,4724,4726,4728],{"class":1944,"line":4718},71,[1942,4720,4721],{"class":2400},"    height",[1942,4723,4016],{"class":1948},[1942,4725,4710],{"class":2400},[1942,4727,4052],{"class":2374},[1942,4729,2899],{"class":1948},[1942,4731,4733,4735,4737,4739,4741,4743,4746],{"class":1944,"line":4732},72,[1942,4734,4045],{"class":2400},[1942,4736,4016],{"class":1948},[1942,4738,3021],{"class":2400},[1942,4740,4052],{"class":2374},[1942,4742,4055],{"class":2400},[1942,4744,4745],{"class":2400}," #ccc",[1942,4747,2899],{"class":1948},[1942,4749,4751,4753,4755,4757,4759],{"class":1944,"line":4750},73,[1942,4752,4085],{"class":2400},[1942,4754,4016],{"class":1948},[1942,4756,3083],{"class":2400},[1942,4758,4052],{"class":2374},[1942,4760,2899],{"class":1948},[1942,4762,4764,4766,4768,4770,4772,4774,4776],{"class":1944,"line":4763},74,[1942,4765,4031],{"class":2400},[1942,4767,4016],{"class":1948},[1942,4769,4481],{"class":2400},[1942,4771,4021],{"class":2374},[1942,4773,4486],{"class":2400},[1942,4775,4021],{"class":2374},[1942,4777,2899],{"class":1948},[1942,4779,4781],{"class":1944,"line":4780},75,[1942,4782,4111],{"class":1948},[1942,4784,4786],{"class":1944,"line":4785},76,[1942,4787,1956],{"emptyLinePlaceholder":1955},[1942,4789,4791,4794,4797,4800,4803,4806,4808,4811,4813],{"class":1944,"line":4790},77,[1942,4792,4793],{"class":2374},"@media",[1942,4795,4796],{"class":2400}," screen",[1942,4798,4799],{"class":2374}," and",[1942,4801,4802],{"class":1948}," (",[1942,4804,4805],{"class":2400},"min-width",[1942,4807,4016],{"class":1948},[1942,4809,4810],{"class":2400},"768",[1942,4812,4052],{"class":2374},[1942,4814,4815],{"class":1948},") {\n",[1942,4817,4819,4822],{"class":1944,"line":4818},78,[1942,4820,4821],{"class":2068},"    .button-container",[1942,4823,4008],{"class":1948},[1942,4825,4827,4830,4832,4835,4837,4839,4841,4843,4846],{"class":1944,"line":4826},79,[1942,4828,4829],{"class":2400},"        grid-template-columns",[1942,4831,4016],{"class":1948},[1942,4833,4834],{"class":2400},"repeat",[1942,4836,2517],{"class":1948},[1942,4838,3083],{"class":2400},[1942,4840,2850],{"class":1948},[1942,4842,3021],{"class":2400},[1942,4844,4845],{"class":2374},"fr",[1942,4847,4080],{"class":1948},[1942,4849,4851],{"class":1944,"line":4850},80,[1942,4852,4853],{"class":1948},"    }\n",[1942,4855,4857],{"class":1944,"line":4856},81,[1942,4858,4111],{"class":1948},[1942,4860,4862,4864,4866],{"class":1944,"line":4861},82,[1942,4863,2087],{"class":1948},[1942,4865,2308],{"class":2064},[1942,4867,2082],{"class":1948},[2035,4869,4871],{"id":4870},"adding-submission-logic-inside-the-vue-component","Adding Submission Logic Inside The Vue Component",[1840,4873,4874,4875,4877],{},"We’re going to write a handler function to actually submit our data to our Directus ",[1929,4876,1931],{}," collection.",[1840,4879,4880,4881,4884],{},"At the end of our ",[1929,4882,4883],{},"\u003Cscript>"," tag, let’s add our submission handler.",[1934,4886,4888],{"className":2052,"code":4887,"language":2054,"meta":24,"style":24},"async function handleSubmission(rating?: number) {\n    loading.value = true;\n    if (rating) feedback.rating = rating;\n\n    const body = {\n        id: feedback.id,\n        rating: feedback.rating,\n        comments: feedback.comments,\n        title: props.title,\n        url: props.url,\n    };\n\n    // Replace this with your own Directus URL\n    const directusBaseUrl = 'https://yourdirectusurl.directus.app';\n\n    try {\n        let response;\n\n        // If we've already created a feedback record, we'll update it with the new rating or comments.\n        if (feedback.id) {\n            response = await fetch(`${directusBaseUrl}/items/docs_feedback/${feedback.id}`, {\n                method: 'PUT',\n                body: JSON.stringify(body),\n            });\n        } else {\n            response = await fetch(`${directusBaseUrl}/items/docs_feedback/${feedback.id}`, {\n                method: 'POST',\n                body: JSON.stringify(body),\n            });\n        }\n\n        const data = await response.json();\n        feedback.id = data.id;\n\n        // If the reponse has comments, we can assume they've completed the second step. So we'll show the success message.\n        if (data.comments) {\n            success.value = true;\n        }\n    } catch (err) {\n        error.value = err;\n    } finally {\n        loading.value = false;\n    }\n}\n",[1929,4889,4890,4895,4900,4905,4909,4914,4919,4924,4929,4934,4939,4944,4948,4953,4958,4962,4967,4972,4976,4981,4986,4991,4996,5001,5006,5011,5015,5020,5024,5028,5033,5037,5042,5047,5051,5056,5061,5066,5070,5075,5080,5085,5090,5094],{"__ignoreMap":24},[1942,4891,4892],{"class":1944,"line":1945},[1942,4893,4894],{"class":1948},"async function handleSubmission(rating?: number) {\n",[1942,4896,4897],{"class":1944,"line":1952},[1942,4898,4899],{"class":1948},"    loading.value = true;\n",[1942,4901,4902],{"class":1944,"line":1959},[1942,4903,4904],{"class":1948},"    if (rating) feedback.rating = rating;\n",[1942,4906,4907],{"class":1944,"line":1969},[1942,4908,1956],{"emptyLinePlaceholder":1955},[1942,4910,4911],{"class":1944,"line":1977},[1942,4912,4913],{"class":1948},"    const body = {\n",[1942,4915,4916],{"class":1944,"line":1985},[1942,4917,4918],{"class":1948},"        id: feedback.id,\n",[1942,4920,4921],{"class":1944,"line":1993},[1942,4922,4923],{"class":1948},"        rating: feedback.rating,\n",[1942,4925,4926],{"class":1944,"line":2001},[1942,4927,4928],{"class":1948},"        comments: feedback.comments,\n",[1942,4930,4931],{"class":1944,"line":2156},[1942,4932,4933],{"class":1948},"        title: props.title,\n",[1942,4935,4936],{"class":1944,"line":2178},[1942,4937,4938],{"class":1948},"        url: props.url,\n",[1942,4940,4941],{"class":1944,"line":2199},[1942,4942,4943],{"class":1948},"    };\n",[1942,4945,4946],{"class":1944,"line":2209},[1942,4947,1956],{"emptyLinePlaceholder":1955},[1942,4949,4950],{"class":1944,"line":2219},[1942,4951,4952],{"class":1948},"    // Replace this with your own Directus URL\n",[1942,4954,4955],{"class":1944,"line":2234},[1942,4956,4957],{"class":1948},"    const directusBaseUrl = 'https://yourdirectusurl.directus.app';\n",[1942,4959,4960],{"class":1944,"line":2240},[1942,4961,1956],{"emptyLinePlaceholder":1955},[1942,4963,4964],{"class":1944,"line":2249},[1942,4965,4966],{"class":1948},"    try {\n",[1942,4968,4969],{"class":1944,"line":2264},[1942,4970,4971],{"class":1948},"        let response;\n",[1942,4973,4974],{"class":1944,"line":2270},[1942,4975,1956],{"emptyLinePlaceholder":1955},[1942,4977,4978],{"class":1944,"line":2279},[1942,4979,4980],{"class":1948},"        // If we've already created a feedback record, we'll update it with the new rating or comments.\n",[1942,4982,4983],{"class":1944,"line":2289},[1942,4984,4985],{"class":1948},"        if (feedback.id) {\n",[1942,4987,4988],{"class":1944,"line":2298},[1942,4989,4990],{"class":1948},"            response = await fetch(`${directusBaseUrl}/items/docs_feedback/${feedback.id}`, {\n",[1942,4992,4993],{"class":1944,"line":2303},[1942,4994,4995],{"class":1948},"                method: 'PUT',\n",[1942,4997,4998],{"class":1944,"line":2316},[1942,4999,5000],{"class":1948},"                body: JSON.stringify(body),\n",[1942,5002,5003],{"class":1944,"line":2610},[1942,5004,5005],{"class":1948},"            });\n",[1942,5007,5008],{"class":1944,"line":2629},[1942,5009,5010],{"class":1948},"        } else {\n",[1942,5012,5013],{"class":1944,"line":2648},[1942,5014,4990],{"class":1948},[1942,5016,5017],{"class":1944,"line":2657},[1942,5018,5019],{"class":1948},"                method: 'POST',\n",[1942,5021,5022],{"class":1944,"line":2666},[1942,5023,5000],{"class":1948},[1942,5025,5026],{"class":1944,"line":2681},[1942,5027,5005],{"class":1948},[1942,5029,5030],{"class":1944,"line":2704},[1942,5031,5032],{"class":1948},"        }\n",[1942,5034,5035],{"class":1944,"line":2709},[1942,5036,1956],{"emptyLinePlaceholder":1955},[1942,5038,5039],{"class":1944,"line":2718},[1942,5040,5041],{"class":1948},"        const data = await response.json();\n",[1942,5043,5044],{"class":1944,"line":2733},[1942,5045,5046],{"class":1948},"        feedback.id = data.id;\n",[1942,5048,5049],{"class":1944,"line":2751},[1942,5050,1956],{"emptyLinePlaceholder":1955},[1942,5052,5053],{"class":1944,"line":2756},[1942,5054,5055],{"class":1948},"        // If the reponse has comments, we can assume they've completed the second step. So we'll show the success message.\n",[1942,5057,5058],{"class":1944,"line":2765},[1942,5059,5060],{"class":1948},"        if (data.comments) {\n",[1942,5062,5063],{"class":1944,"line":2774},[1942,5064,5065],{"class":1948},"            success.value = true;\n",[1942,5067,5068],{"class":1944,"line":2783},[1942,5069,5032],{"class":1948},[1942,5071,5072],{"class":1944,"line":2788},[1942,5073,5074],{"class":1948},"    } catch (err) {\n",[1942,5076,5077],{"class":1944,"line":2799},[1942,5078,5079],{"class":1948},"        error.value = err;\n",[1942,5081,5082],{"class":1944,"line":3389},[1942,5083,5084],{"class":1948},"    } finally {\n",[1942,5086,5087],{"class":1944,"line":3398},[1942,5088,5089],{"class":1948},"        loading.value = false;\n",[1942,5091,5092],{"class":1944,"line":3415},[1942,5093,4853],{"class":1948},[1942,5095,5096],{"class":1944,"line":3420},[1942,5097,4111],{"class":1948},[1840,5099,5100,5101,5104],{},"This function ",[1929,5102,5103],{},"handleSubmission"," accepts an optional rating and then conditionally creates a new feedback item or updates depending on which step the user completed.",[1840,5106,5107,5108,5111],{},"We also need to update our template to call our handler using the ",[1929,5109,5110],{},"@click"," directive.",[1934,5113,5115],{"className":2052,"code":5114,"language":2054,"meta":24,"style":24},"\u003Ctemplate>\n    \u003Cdiv class=\"wrapper\">\n        \u003CTransition name=\"fade\" mode=\"out-in\">\n            \u003Cdiv v-if=\"!feedback.rating\" class=\"step\">\n                \u003Cdiv>\n                    \u003Cdiv>\n                        \u003Cp class=\"desc\">How can we improve?\u003C/p>\n                        \u003Cp class=\"heading\">How helpful was this article?\u003C/p>\n                    \u003C/div>\n                \u003C/div>\n                \u003Cdiv class=\"button-container\">\n                    \u003Cbutton v-for=\"item in ratingOptions\"\n                        :key=\"item.value\"\n                        class=\"btn\"\n                        @click=\"handleSubmission(item.value)\"> // [!code ++]\n                        \u003Cspan>{{ item.label }}\u003C/span>\n                    \u003C/button>\n                \u003C/div>\n            \u003C/div>\n            \u003Cdiv v-else-if=\"feedback.rating && !success\" class=\"step\">\n                \u003Cdiv>\n                    \u003Cp class=\"desc\">This article is\u003C/p>\n                    \u003Cdiv>\n                        \u003Cspan>{{ getRatingOption(feedback.rating)?.label }}\u003C/span>\n                        \u003Cbutton style=\"margin-left: 0.5rem\" class=\"btn\" @click=\"feedback.rating = undefined\">\n                            \u003Cspan mi icon>close\u003C/span>\n                        \u003C/button>\n                    \u003C/div>\n                \u003C/div>\n                \u003Cp class=\"heading\">{{ getRatingOption(feedback.rating)?.message }}\u003C/p>\n                \u003Ctextarea v-model=\"feedback.comments\" autofocus class=\"input\" />\n                \u003Cbutton\n                    class=\"btn btn-primary\"\n                    :disabled=\"!feedback.comments\"\n                    @click=\"handleSubmission()\"> // [!code ++]\n                    Send Us Your Feedback\n                \u003C/button>\n            \u003C/div>\n            \u003Cdiv v-else class=\"step\">\n                \u003Cp class=\"heading\">Thanks for your feedback!\u003C/p>\n            \u003C/div>\n        \u003C/Transition>\n    \u003C/div>\n\u003C/template>\n",[1929,5116,5117,5125,5139,5164,5184,5192,5200,5218,5236,5244,5252,5266,5279,5289,5299,5311,5323,5331,5339,5347,5367,5375,5393,5401,5413,5441,5461,5469,5477,5485,5503,5527,5534,5544,5554,5566,5571,5579,5587,5603,5621,5629,5637,5645],{"__ignoreMap":24},[1942,5118,5119,5121,5123],{"class":1944,"line":1945},[1942,5120,2061],{"class":1948},[1942,5122,2102],{"class":2064},[1942,5124,2082],{"class":1948},[1942,5126,5127,5129,5131,5133,5135,5137],{"class":1944,"line":1952},[1942,5128,2109],{"class":1948},[1942,5130,2112],{"class":2064},[1942,5132,2115],{"class":2068},[1942,5134,2075],{"class":1948},[1942,5136,2120],{"class":2078},[1942,5138,2082],{"class":1948},[1942,5140,5141,5143,5146,5149,5151,5154,5157,5159,5162],{"class":1944,"line":1959},[1942,5142,2127],{"class":1948},[1942,5144,5145],{"class":2064},"Transition",[1942,5147,5148],{"class":2068}," name",[1942,5150,2075],{"class":1948},[1942,5152,5153],{"class":2078},"\"fade\"",[1942,5155,5156],{"class":2068}," mode",[1942,5158,2075],{"class":1948},[1942,5160,5161],{"class":2078},"\"out-in\"",[1942,5163,2082],{"class":1948},[1942,5165,5166,5168,5170,5172,5174,5176,5178,5180,5182],{"class":1944,"line":1969},[1942,5167,2149],{"class":1948},[1942,5169,2112],{"class":2064},[1942,5171,2581],{"class":2068},[1942,5173,2075],{"class":1948},[1942,5175,2586],{"class":2078},[1942,5177,2115],{"class":2068},[1942,5179,2075],{"class":1948},[1942,5181,2136],{"class":2078},[1942,5183,2082],{"class":1948},[1942,5185,5186,5188,5190],{"class":1944,"line":1977},[1942,5187,2159],{"class":1948},[1942,5189,2112],{"class":2064},[1942,5191,2082],{"class":1948},[1942,5193,5194,5196,5198],{"class":1944,"line":1985},[1942,5195,3295],{"class":1948},[1942,5197,2112],{"class":2064},[1942,5199,2082],{"class":1948},[1942,5201,5202,5204,5206,5208,5210,5212,5214,5216],{"class":1944,"line":1993},[1942,5203,3328],{"class":1948},[1942,5205,1840],{"class":2064},[1942,5207,2115],{"class":2068},[1942,5209,2075],{"class":1948},[1942,5211,2168],{"class":2078},[1942,5213,2171],{"class":1948},[1942,5215,1840],{"class":2064},[1942,5217,2082],{"class":1948},[1942,5219,5220,5222,5224,5226,5228,5230,5232,5234],{"class":1944,"line":2001},[1942,5221,3328],{"class":1948},[1942,5223,1840],{"class":2064},[1942,5225,2115],{"class":2068},[1942,5227,2075],{"class":1948},[1942,5229,2189],{"class":2078},[1942,5231,2192],{"class":1948},[1942,5233,1840],{"class":2064},[1942,5235,2082],{"class":1948},[1942,5237,5238,5240,5242],{"class":1944,"line":2156},[1942,5239,3342],{"class":1948},[1942,5241,2112],{"class":2064},[1942,5243,2082],{"class":1948},[1942,5245,5246,5248,5250],{"class":1944,"line":2178},[1942,5247,3777],{"class":1948},[1942,5249,2112],{"class":2064},[1942,5251,2082],{"class":1948},[1942,5253,5254,5256,5258,5260,5262,5264],{"class":1944,"line":2199},[1942,5255,2159],{"class":1948},[1942,5257,2112],{"class":2064},[1942,5259,2115],{"class":2068},[1942,5261,2075],{"class":1948},[1942,5263,3283],{"class":2078},[1942,5265,2082],{"class":1948},[1942,5267,5268,5270,5272,5274,5276],{"class":1944,"line":2209},[1942,5269,3295],{"class":1948},[1942,5271,3298],{"class":2064},[1942,5273,3301],{"class":2068},[1942,5275,2075],{"class":1948},[1942,5277,5278],{"class":2078},"\"item in ratingOptions\"\n",[1942,5280,5281,5284,5286],{"class":1944,"line":2219},[1942,5282,5283],{"class":2068},"                        :key",[1942,5285,2075],{"class":1948},[1942,5287,5288],{"class":2078},"\"item.value\"\n",[1942,5290,5291,5294,5296],{"class":1944,"line":2234},[1942,5292,5293],{"class":2068},"                        class",[1942,5295,2075],{"class":1948},[1942,5297,5298],{"class":2078},"\"btn\"\n",[1942,5300,5301,5304,5306,5309],{"class":1944,"line":2240},[1942,5302,5303],{"class":2068},"                        @click",[1942,5305,2075],{"class":1948},[1942,5307,5308],{"class":2078},"\"handleSubmission(item.value)\"",[1942,5310,2595],{"class":1948},[1942,5312,5313,5315,5317,5319,5321],{"class":1944,"line":2249},[1942,5314,3328],{"class":1948},[1942,5316,1942],{"class":2064},[1942,5318,3333],{"class":1948},[1942,5320,1942],{"class":2064},[1942,5322,2082],{"class":1948},[1942,5324,5325,5327,5329],{"class":1944,"line":2264},[1942,5326,3342],{"class":1948},[1942,5328,3298],{"class":2064},[1942,5330,2082],{"class":1948},[1942,5332,5333,5335,5337],{"class":1944,"line":2270},[1942,5334,3777],{"class":1948},[1942,5336,2112],{"class":2064},[1942,5338,2082],{"class":1948},[1942,5340,5341,5343,5345],{"class":1944,"line":2279},[1942,5342,2202],{"class":1948},[1942,5344,2112],{"class":2064},[1942,5346,2082],{"class":1948},[1942,5348,5349,5351,5353,5355,5357,5359,5361,5363,5365],{"class":1944,"line":2289},[1942,5350,2149],{"class":1948},[1942,5352,2112],{"class":2064},[1942,5354,2688],{"class":2068},[1942,5356,2075],{"class":1948},[1942,5358,2693],{"class":2078},[1942,5360,2115],{"class":2068},[1942,5362,2075],{"class":1948},[1942,5364,2136],{"class":2078},[1942,5366,2082],{"class":1948},[1942,5368,5369,5371,5373],{"class":1944,"line":2298},[1942,5370,2159],{"class":1948},[1942,5372,2112],{"class":2064},[1942,5374,2082],{"class":1948},[1942,5376,5377,5379,5381,5383,5385,5387,5389,5391],{"class":1944,"line":2303},[1942,5378,3295],{"class":1948},[1942,5380,1840],{"class":2064},[1942,5382,2115],{"class":2068},[1942,5384,2075],{"class":1948},[1942,5386,2168],{"class":2078},[1942,5388,3703],{"class":1948},[1942,5390,1840],{"class":2064},[1942,5392,2082],{"class":1948},[1942,5394,5395,5397,5399],{"class":1944,"line":2316},[1942,5396,3295],{"class":1948},[1942,5398,2112],{"class":2064},[1942,5400,2082],{"class":1948},[1942,5402,5403,5405,5407,5409,5411],{"class":1944,"line":2610},[1942,5404,3328],{"class":1948},[1942,5406,1942],{"class":2064},[1942,5408,3724],{"class":1948},[1942,5410,1942],{"class":2064},[1942,5412,2082],{"class":1948},[1942,5414,5415,5417,5419,5422,5424,5427,5429,5431,5433,5435,5437,5439],{"class":1944,"line":2629},[1942,5416,3328],{"class":1948},[1942,5418,3298],{"class":2064},[1942,5420,5421],{"class":2068}," style",[1942,5423,2075],{"class":1948},[1942,5425,5426],{"class":2078},"\"margin-left: 0.5rem\"",[1942,5428,2115],{"class":2068},[1942,5430,2075],{"class":1948},[1942,5432,3321],{"class":2078},[1942,5434,3743],{"class":2068},[1942,5436,2075],{"class":1948},[1942,5438,3748],{"class":2078},[1942,5440,2082],{"class":1948},[1942,5442,5443,5446,5448,5451,5454,5457,5459],{"class":1944,"line":2648},[1942,5444,5445],{"class":1948},"                            \u003C",[1942,5447,1942],{"class":2064},[1942,5449,5450],{"class":2068}," mi",[1942,5452,5453],{"class":2068}," icon",[1942,5455,5456],{"class":1948},">close\u003C/",[1942,5458,1942],{"class":2064},[1942,5460,2082],{"class":1948},[1942,5462,5463,5465,5467],{"class":1944,"line":2657},[1942,5464,3760],{"class":1948},[1942,5466,3298],{"class":2064},[1942,5468,2082],{"class":1948},[1942,5470,5471,5473,5475],{"class":1944,"line":2666},[1942,5472,3342],{"class":1948},[1942,5474,2112],{"class":2064},[1942,5476,2082],{"class":1948},[1942,5478,5479,5481,5483],{"class":1944,"line":2681},[1942,5480,3777],{"class":1948},[1942,5482,2112],{"class":2064},[1942,5484,2082],{"class":1948},[1942,5486,5487,5489,5491,5493,5495,5497,5499,5501],{"class":1944,"line":2704},[1942,5488,2159],{"class":1948},[1942,5490,1840],{"class":2064},[1942,5492,2115],{"class":2068},[1942,5494,2075],{"class":1948},[1942,5496,2189],{"class":2078},[1942,5498,3796],{"class":1948},[1942,5500,1840],{"class":2064},[1942,5502,2082],{"class":1948},[1942,5504,5505,5507,5509,5511,5513,5515,5517,5519,5521,5523,5525],{"class":1944,"line":2709},[1942,5506,2159],{"class":1948},[1942,5508,3807],{"class":2064},[1942,5510,3810],{"class":2068},[1942,5512,2075],{"class":1948},[1942,5514,3815],{"class":2078},[1942,5516,3818],{"class":2068},[1942,5518,2115],{"class":2068},[1942,5520,2075],{"class":1948},[1942,5522,3825],{"class":2078},[1942,5524,3829],{"class":3828},[1942,5526,2082],{"class":1948},[1942,5528,5529,5531],{"class":1944,"line":2718},[1942,5530,2159],{"class":1948},[1942,5532,5533],{"class":2064},"button\n",[1942,5535,5536,5539,5541],{"class":1944,"line":2733},[1942,5537,5538],{"class":2068},"                    class",[1942,5540,2075],{"class":1948},[1942,5542,5543],{"class":2078},"\"btn btn-primary\"\n",[1942,5545,5546,5549,5551],{"class":1944,"line":2751},[1942,5547,5548],{"class":2068},"                    :disabled",[1942,5550,2075],{"class":1948},[1942,5552,5553],{"class":2078},"\"!feedback.comments\"\n",[1942,5555,5556,5559,5561,5564],{"class":1944,"line":2756},[1942,5557,5558],{"class":2068},"                    @click",[1942,5560,2075],{"class":1948},[1942,5562,5563],{"class":2078},"\"handleSubmission()\"",[1942,5565,2595],{"class":1948},[1942,5567,5568],{"class":1944,"line":2765},[1942,5569,5570],{"class":1948},"                    Send Us Your Feedback\n",[1942,5572,5573,5575,5577],{"class":1944,"line":2774},[1942,5574,3777],{"class":1948},[1942,5576,3298],{"class":2064},[1942,5578,2082],{"class":1948},[1942,5580,5581,5583,5585],{"class":1944,"line":2783},[1942,5582,2202],{"class":1948},[1942,5584,2112],{"class":2064},[1942,5586,2082],{"class":1948},[1942,5588,5589,5591,5593,5595,5597,5599,5601],{"class":1944,"line":2788},[1942,5590,2149],{"class":1948},[1942,5592,2112],{"class":2064},[1942,5594,2740],{"class":2068},[1942,5596,2115],{"class":2068},[1942,5598,2075],{"class":1948},[1942,5600,2136],{"class":2078},[1942,5602,2082],{"class":1948},[1942,5604,5605,5607,5609,5611,5613,5615,5617,5619],{"class":1944,"line":2799},[1942,5606,2159],{"class":1948},[1942,5608,1840],{"class":2064},[1942,5610,2115],{"class":2068},[1942,5612,2075],{"class":1948},[1942,5614,2189],{"class":2078},[1942,5616,3910],{"class":1948},[1942,5618,1840],{"class":2064},[1942,5620,2082],{"class":1948},[1942,5622,5623,5625,5627],{"class":1944,"line":3389},[1942,5624,2202],{"class":1948},[1942,5626,2112],{"class":2064},[1942,5628,2082],{"class":1948},[1942,5630,5631,5633,5635],{"class":1944,"line":3398},[1942,5632,2212],{"class":1948},[1942,5634,5145],{"class":2064},[1942,5636,2082],{"class":1948},[1942,5638,5639,5641,5643],{"class":1944,"line":3415},[1942,5640,2282],{"class":1948},[1942,5642,2112],{"class":2064},[1942,5644,2082],{"class":1948},[1942,5646,5647,5649,5651],{"class":1944,"line":3420},[1942,5648,2087],{"class":1948},[1942,5650,2102],{"class":2064},[1942,5652,2082],{"class":1948},[1840,5654,5655],{},"Sweet! Now there’s just one last step before we have a working component.",[1844,5657,5659],{"id":5658},"updating-permissions-inside-directus","Updating Permissions inside Directus",[1840,5661,5662,5663,5666],{},"Right now, if we try to submit some feedback, we’re probably to going receive an ",[1929,5664,5665],{},"Permission denied"," error from Directus.",[1840,5668,5669],{},"This is because all collections have zero public permissions by default. While this is great for security, it’s not so great if we want to store our feedback data.",[1840,5671,5672,5673,5676,5677,4877],{},"Open up the Public role with the ",[1897,5674,5675],{"href":607},"Access Control settings",". Then scroll to find the ",[1929,5678,1931],{},[1840,5680,5681],{},[1860,5682],{"alt":5683,"src":5684},"Directus Roles and Permissions settings page, the docs_feedback collection is highlighted and all CRUD permission settings are set to not allowed","/img/61bf4b98-d0e6-4682-b523-b4893065ecfe.webp",[1840,5686,5687],{},[1868,5688,5689],{},"Create and Update Operations",[1840,5691,5692,5693,5697,5698,5701],{},"Click the ",[5694,5695],"icon",{"name":5696},"material-symbols:block"," button inside each column and choose ",[5694,5699],{"name":5700},"material-symbols:check"," All Access.",[1840,5703,5704],{},[1868,5705,5706],{},"Read Operation",[1840,5708,5709],{},"We might not want any prying eyes to be able to read the actual feedback ratings and content, so we’ll use some custom permissions to restrict the fields that anyone can ‘read’.",[1840,5711,5712],{},"Click the button for the Read column, and choose Custom Permissions.",[1840,5714,5715,5716,5719],{},"On the Field Permissions tab, check only the ",[1929,5717,5718],{},"id"," field.",[1840,5721,5722],{},[1860,5723],{"alt":5724,"src":5725},"Custom permission settings screen for docs_feedback Read operation. List of fields with checkboxes but only the id field is checked.","/img/3e56d4d1-062a-4dc3-8508-fa6cf36fc280.webp",[1840,5727,5728],{},"When you’re all done, it should look like this screenshot.",[1840,5730,5731],{},[1860,5732],{"alt":5733,"src":5734},"Directus Roles and Permissions settings page, the docs_feedback collection is highlighted, Create and Update operation permissions are set to Allowed, Read operation has custom permissions","/img/80d24253-ace1-46dc-8c04-9421449b8552.webp",[1840,5736,5737],{},"Awesome! Now on to testing.",[1844,5739,5741],{"id":5740},"testing-the-feedback-widget","Testing the Feedback Widget",[1840,5743,5744],{},"Let’s open this up our Vue app and our Directus instance to test that everything is working as intended.",[1840,5746,5747],{},[1860,5748],{"alt":5749,"src":5750},"Demo of the Vue feedback widget being used","/img/d01e883f-2813-4f62-a810-b41a87f011b5.gif",[1840,5752,5753],{},"Make sure you check that the form submissions are correct inside Directus.",[1840,5755,5756],{},[1860,5757],{"alt":5758,"src":5759},"A Directus detail page for the an item in docs_feedback collection","/img/d5b600f1-39ff-4914-9e2d-d50c70f9fae9.webp",[1844,5761,5763],{"id":5762},"next-steps","Next Steps",[1840,5765,5766],{},"Here’s a few of the next steps you may want to explore beyond this tutorial.",[2035,5768,5770],{"id":5769},"analyze-the-data-using-directus-insights","Analyze the Data Using Directus Insights",[1840,5772,5773],{},"Collecting feedback is just one half of the equation. Analyzing and taking action on the data you receive is the more important part.",[1840,5775,5776,5777,5780],{},"Our module for creating ",[1897,5778,5779],{"href":763},"no-code dashboards - Directus Insights"," - can help you understand the data you collect much easier and faster than browsing through a list of feedback.",[2035,5782,5784],{"id":5783},"secure-form-submissions","Secure form submissions",[1840,5786,5787,5788,5790],{},"To post our form submissions, we just enabled Public create and update access for the ",[1929,5789,1931],{}," collection inside Directus.",[1840,5792,5793],{},"There’s not a lot to gain by spamming documentation feedback submissions but you never know with folks these days.",[1840,5795,5796],{},[1868,5797,5798],{},"Security wise - we could do better.",[1840,5800,5801],{},"Here’s a few options:",[1880,5803,5804,5807],{},[1883,5805,5806],{},"Create a Flow with using an incoming webhook trigger that processes the incoming requests.",[1883,5808,5809],{},"Obscure our Directus instance URL by using a proxy or serverless function to make the call to the Directus API. Netlify, Vercel, and other hosting static site hosting platforms simplify this process.",[2035,5811,5813],{"id":5812},"add-a-session-identifier-to-track-feedback-from-the-same-user","Add a session identifier to track feedback from the same user",[1840,5815,5816],{},"It could be very handy to know if feedback across different articles is coming from the same user.  We don’t really need full blown user sessions stored in the database for this. We could implement it client-side by:",[1880,5818,5819,5830,5833,5846],{},[1883,5820,5821,5822,5825,5826,5829],{},"adding a field to for ",[1929,5823,5824],{},"session_id"," or ",[1929,5827,5828],{},"visitor_id"," to our collection inside Directus",[1883,5831,5832],{},"generating a random ID on a first visit or feedback submission inside the Vue app",[1883,5834,5835,5836,5825,5841],{},"storing the ID within the browser using ",[1897,5837,5840],{"href":5838,"rel":5839},"https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage",[1905],"localStorage",[1897,5842,5845],{"href":5843,"rel":5844},"https://developer.mozilla.org/en-US/docs/Web/API/Window/sessionStorage",[1905],"sessionStorage",[1883,5847,5848],{},"grabbing that ID and passing it in the API call to Directus",[1840,5850,5851,5852,5857],{},"I hope you find this post useful - if you have any questions feel free to join ",[1897,5853,5856],{"href":5854,"rel":5855},"https://community.directus.io",[1905],"our community platform",".",[2308,5859,5860],{},"html pre.shiki code .sxrX7, html code.shiki .sxrX7{--shiki-light:#24292E;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sP4rz, html code.shiki .sP4rz{--shiki-light:#E36209;--shiki-default:#E36209;--shiki-dark:#FFAB70}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sovSZ, html code.shiki .sovSZ{--shiki-light:#22863A;--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .snPdu, html code.shiki .snPdu{--shiki-light:#6F42C1;--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sIIMD, html code.shiki .sIIMD{--shiki-light:#032F62;--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sCsY4, html code.shiki .sCsY4{--shiki-light:#6A737D;--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .s8jYJ, html code.shiki .s8jYJ{--shiki-light:#D73A49;--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sBjJW, html code.shiki .sBjJW{--shiki-light:#005CC5;--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sPrNH, html code.shiki .sPrNH{--shiki-light:#B31D28;--shiki-light-font-style:italic;--shiki-default:#B31D28;--shiki-default-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic}",{"title":24,"searchDepth":1945,"depth":1952,"links":5862},[5863,5864,5865,5866,5874,5875,5876],{"id":1846,"depth":1952,"text":1847},{"id":1866,"depth":1952,"text":1870},{"id":1918,"depth":1952,"text":1919},{"id":2009,"depth":1952,"text":2010,"children":5867},[5868,5869,5870,5871,5872,5873],{"id":2037,"depth":1959,"text":2038},{"id":2340,"depth":1959,"text":2341},{"id":2864,"depth":1959,"text":2865},{"id":3476,"depth":1959,"text":3477},{"id":3972,"depth":1959,"text":3973},{"id":4870,"depth":1959,"text":4871},{"id":5658,"depth":1952,"text":5659},{"id":5740,"depth":1952,"text":5741},{"id":5762,"depth":1952,"text":5763,"children":5877},[5878,5879,5880],{"id":5769,"depth":1959,"text":5770},{"id":5783,"depth":1959,"text":5784},{"id":5812,"depth":1959,"text":5813},"md",{"slug":5883},"build-a-user-feedback-widget-with-vue-js","---\nid: dc13157c-95a1-4486-9dd3-3d0c43876bdc\nslug: build-a-user-feedback-widget-with-vue-js\ntitle: Build a User Feedback Widget with Vue.js\ntechnologies:\n  - vue\nauthors:\n  - name: Bryant Gillespie\n    title: Growth Engineer\ndescription: Learn how we built our docs feedback widget with Directus.\n---\nOne of our DevRel initiatives at Directus is constantly improving our documentation. As a small team with finite time and resources, we rely a lot on user feedback to help guide our writing efforts. But we were missing the most important bit there – your feedback.\n\n## What We’re Building\n\nAt the time of this post, the Directus Docs runs on VitePress (which in turn is based on Vue.js and Vite). Vitepress is a nice bit of kit for quickly generating a static documentation site, but sadly there’s no built-in feature for gathering user feedback.\n\nSo I decided to build my own so our team could make better decisions on where to spend our precious time and attention.\n\nWhile this project was built in the context of Vitepress, this post will show you how to do it with Vue generally. Here’s what our finished product will look like.\n\n![Screenshot of Directus documentation article with a highlighted feedback widget at the bottom of the screen.](/img/b3d6f78c-e8e6-4b5d-82f4-0c74b0188472.webp)\n\n## **Prerequisites**\n\nBefore we hop 🐰 in , here’s what you’ll need to follow along:\n\n**Knowledge**\n\n- Beginner knowledge of Javascript, Typescript, and Vue.js (Composition API)\n\n**Tooling**\n\n- A Directus instance up and running (either [self-hosted](/getting-started/overview) or on [Directus Cloud](https://directus.cloud/))\n- A Vue.js project set up ([Using Vite is recommended](https://vuejs.org/guide/scaling-up/tooling.html#tooling))\n\n## Preparing Directus Collection\n\nFirst off, we're going to need a place to store all this valuable feedback we'll be gathering.\n\nCreate a **`docs_feedback`** collection with the following data model:\n\n```markdown\ndocs_feedback\n\n- id (Type: uuid)\n- date_created (Type: Timestamp, Interface: Date/Time)\n- url (Type: String, Interface: Input)\n- rating (Type: Integer, Interface: Slider)\n- title (Type: String, Interface: Input)\n- comments (Type: Text, Interface: Textarea)\n```\n\n## Creating Vue Component for Article Feedback\n\nJust as if it were the lone dev on a cross-functional team – we’re going to place a lot of different responsibilities on our hard-working little Vue component.\n\n- **Rating System**: We’ll use a 1 to 4 scale, with each value associated with a different message. These messages will help engage users and guide them through the feedback process.\n- **Open Ended Feedback**: We provide a text area for users to write their thoughts. This is where the gold is. We want users to share their ideas, suggestions, and insights – positive or constructive 😭.\n- **Posting Data to Directus**: The component handles the submission of the feedback to Directus. It constructs the feedback object and makes a POST request to the feedback API endpoint.\n\n### Scaffolding the Feedback Component\n\nCreate a new file in our `components` directory named `ArticleFeedback.vue` . Then copy and paste the following code.\n\n```vue\n\u003Cscript setup lang=\"ts\">\n\u003C/script>\n\n\u003Ctemplate>\n\t\u003Cdiv class=\"wrapper\">\n\t\t\u003Cdiv class=\"step\">\n\t\t\t\u003C!-- Step 1. Show Rating Buttons -->\n\t\t\t\u003Cdiv>\n\t\t\t\t\u003Cp class=\"desc\">How can we improve?\u003C/p>\n\t\t\t\t\u003Cp class=\"heading\">How helpful was this article?\u003C/p>\n\t\t\t\u003C/div>\n\t\t\u003C/div>\n\t\t\u003Cdiv class=\"step\">\n\t\t\t\u003C!-- Step 2. Ask for Comments -->\n\t\t\u003C/div>\n\t\t\u003Cdiv class=\"step\">\n\t\t\t\u003C!-- Step 3. Show Success Message -->\n\t\t\u003C/div>\n\t\u003C/div>\n\u003C/template>\n\n\u003Cstyle scoped>\n\u003C/style>\n```\n\nWe’ve got three different states (or steps as I’m calling them) we’ll need to build.\n\n1. An initial state that shows the feedback prompt and rating buttons.\n2. Once a rating has been selected, a state which asks for comments and feedback.\n3. A success state once form submission is complete.\n\n### Adding Props and Reactive Logic\n\nNow let’s start adding our logic to control these three steps.\n\n```vue\n\u003Cscript setup lang=\"ts\">\nimport { ref, reactive } from 'vue'; // [!code ++]\n\nconst props = defineProps\u003C{  // [!code ++]\n\ttitle: string;  // [!code ++]\n\turl: string  // [!code ++]\n}>(); // [!code ++]\n\nconst feedback = reactive\u003C{ // [!code ++]\n\tid?: string; // [!code ++]\n\trating?: number; // [!code ++]\n\tcomments?: string; // [!code ++]\n}>({}); // [!code ++]\n\nconst success = ref(false); // [!code ++]\n\u003C/script>\n\n\u003Ctemplate>\n\t\u003Cdiv class=\"wrapper\">\n\t\t\u003Cdiv class=\"step\"> // [!code --]\n\t\t\u003Cdiv v-if=\"!feedback.rating\" class=\"step\"> // [!code ++]\n\t\t\t\u003C!-- Step 1. Show Rating Buttons -->\n\t\t\t\u003Cdiv>\n\t\t\t\t\u003Cp class=\"desc\">How can we improve?\u003C/p>\n\t\t\t\t\u003Cp class=\"heading\">How helpful was this article?\u003C/p>\n\t\t\t\u003C/div>\n\t\t\u003C/div>\n\t\t\u003Cdiv class=\"step\"> // [!code --]\n\t\t\u003Cdiv v-else-if=\"feedback.rating && !success\" class=\"step\"> // [!code ++]\n\t\t\t\u003C!-- Step 2. Ask for Comments -->\n\t\t\u003C/div>\n\t\t\u003Cdiv class=\"step\"> // [!code --]\n\t\t\u003Cdiv v-else class=\"step\"> // [!code ++]\n\t\t\t\u003C!-- Step 3. Show Success Message -->\n\t\t\u003C/div>\n\t\u003C/div>\n\u003C/template>\n\n\u003Cstyle scoped>\n\u003C/style>\n```\n\n1. Import the `ref` and `reactive` functions from Vue.\n2. We’ll pass the `url` and page `title` as props from the parent component that contains this widget.\n3. Create a reactive object `feedback` to manage our form submission data.\n4. Create a reactive `success` variable to hold the success state.\n5. Use `v-if`, `v-else-if`, and `v-else` to control what step of the feedback process is shown.\n\nWith the logic roughed in, let’s add our rating buttons.\n\n### Adding the Rating Options\n\n```vue\n\u003Cscript setup lang=\"ts\">\nimport { ref, reactive } from 'vue';\n\nconst props = defineProps\u003C{ title: string; url: string }>();\n\nconst feedback = reactive\u003C{\n\tid?: string;\n\trating?: number;\n\tcomments?: string;\n}>({});\n\nconst ratingOptions = [ // [!code ++]\n\t{ label: 'Worst Doc Ever 🗑️', value: 1, message: 'Woof! 🤦‍♂️ Sorry about that. How do we fix it?' }, // [!code ++]\n\t{ label: 'Not Helpful 😡', value: 2, message: '🧐 Help us do better. How can we improve this article?' }, // [!code ++]\n\t{ label: 'Helpful 😃', value: 3, message: 'Nice! 👍 Anything we can improve upon?' }, // [!code ++]\n\t{ label: 'Super Helpful 🤩', value: 4, message: `Awesome! The whole team is rejoicing in celebration! 🥳🎉🎊 Anything you'd like to say to them?` }, // [!code ++]\n]; // [!code ++]\n\nfunction getRatingOption(rating: number) { // [!code ++]\n\treturn ratingOptions.find((option) => option.value === rating); // [!code ++]\n} // [!code ++]\n\u003C/script>\n\n\u003Ctemplate>\n\t\u003Cdiv class=\"wrapper\">\n\t\t\u003Cdiv v-if=\"!feedback.rating\" class=\"step\">\n\t\t\t\u003C!-- Step 1. Show Rating Buttons -->\n\t\t\t\u003Cdiv>\n\t\t\t\t\u003Cp class=\"desc\">How can we improve?\u003C/p>\n\t\t\t\t\u003Cp class=\"heading\">How helpful was this article?\u003C/p>\n\t\t\t\u003C/div>\n\t\t\t\u003Cdiv class=\"button-container\"> // [!code ++]\n\t\t\t\t\t\u003C!-- We'll add a function for handling button clicks while adding our submission logic -->\n\t\t\t\t\t\u003Cbutton v-for=\"item in ratingOptions\" :key=\"item.value\" class=\"btn\"> // [!code ++]\n\t\t\t\t\t\t\u003Cspan>{{ item.label }}\u003C/span> // [!code ++]\n\t\t\t\t\t\u003C/button> // [!code ++]\n\t\t\t\u003C/div> // [!code ++]\n\t\t\u003C/div>\n\t\t\u003Cdiv v-else-if=\"feedback.rating && !success\" class=\"step\">\n\t\t\t\u003C!-- Step 2. Ask for Comments -->\n\t\t\u003C/div>\n\t\t\u003Cdiv v-else class=\"step\">\n\t\t\t\u003C!-- Step 3. Show Success Message -->\n\t\t\u003C/div>\n\t\u003C/div>\n\u003C/template>\n```\n\nThe rating options will be an array of objects that have a visible `label`, a corresponding `value` of 1-4, and a dynamic`message` that we’ll display to encourage the user to leave comments after selecting a rating.\n\nWe’ll also create a small helper function to return the rating object based when passing a number value. This will come in handy in the second step because we’re going to display the rating the user chose.\n\nAdd a new div to Step 1 below the feedback prompt that will contain our rating options. Inside that, we’ll use `v-for` to loop through the `ratingOptions` array and render the individual buttons.\n\n### Asking for Comments\n\n```vue\n\u003Ctemplate>\n\t\u003Cdiv class=\"wrapper\">\n\t\t\u003Cdiv v-if=\"!feedback.rating\" class=\"step\">\n\t\t\t\u003C!-- Step 1. Show Rating Buttons -->\n\t\t\t\u003Cdiv>\n\t\t\t\t\u003Cp class=\"desc\">How can we improve?\u003C/p>\n\t\t\t\t\u003Cp class=\"heading\">How helpful was this article?\u003C/p>\n\t\t\t\u003C/div>\n\t\t\t\u003Cdiv class=\"button-container\">\n\t\t\t\t\t\u003Cbutton v-for=\"item in ratingOptions\" :key=\"item.value\" class=\"btn\">\n\t\t\t\t\t\t\u003Cspan>{{ item.label }}\u003C/span>\n\t\t\t\t\t\u003C/button>\n\t\t\t\u003C/div>\n\t\t\u003C/div>\n\t\t\u003Cdiv v-else-if=\"feedback.rating && !success\" class=\"step\">\n\t\t\t\u003C!-- Step 2. Ask for Comments -->\n\t\t\t\t\u003Cdiv> // [!code ++]\n\t\t\t\t\t\u003Cp class=\"desc\">This article is\u003C/p> // [!code ++]\n\t\t\t\t\t\u003Cdiv> // [!code ++]\n\t\t\t\t\t\t\u003Cspan>{{ getRatingOption(feedback.rating)?.label }}\u003C/span> // [!code ++]\n\t\t\t\t\t\t\u003Cbutton class=\"btn\" @click=\"feedback.rating = undefined\"> // [!code ++]\n\t\t\t\t\t\t\t❌ // [!code ++]\n\t\t\t\t\t\t\u003C/button> // [!code ++]\n\t\t\t\t\t\u003C/div> // [!code ++]\n\t\t\t\t\u003C/div> // [!code ++]\n\t\t\t\t\u003Cp class=\"heading\">{{ getRatingOption(feedback.rating)?.message }}\u003C/p> // [!code ++]\n\t\t\t\t\u003Ctextarea v-model=\"feedback.comments\" autofocus class=\"input\" /> // [!code ++]\n\t\t\t\t\u003Cbutton class=\"btn btn-primary\" :disabled=\"!feedback.comments\"> // [!code ++]\n\t\t\t\t\tSend Us Your Feedback // [!code ++]\n\t\t\t\t\u003C/button> // [!code ++]\n\t\t\u003C/div>\n\t\t\u003Cdiv v-else class=\"step\">\n\t\t\t\u003C!-- Step 3. Show Success Message -->\n\t\t\t\u003Cp class=\"heading\">Thanks for your feedback!\u003C/p> // [!code ++]\n\t\t\u003C/div>\n\t\u003C/div>\n\u003C/template>\n```\n\nIn Step 2 of the process, we’re showing the user the rating they chose using our `getRatingOption` helper function we created.\n\nTo improve the user experience, we’ll also let users go back and choose a different rating in case they picked the wrong one by mistake. Whenever they click the close button we’ll set the `feedback.rating` property to `undefined` which will take the user back to Step 1 based on the `v-if` logic we created.\n\nBelow that, we’ll show the proper message for the option they chose to encourage them to leave helpful comments in short form with a textarea input and a submit button.\n\nWe’ll also prevent them from submitting from Step 2 when the comments are empty, so we pass the `:disabled=\"!feedback.comments\"` prop to the button element.\n\n### Adding Styling\n\nNext, let’s add some basic styling.\n\n```vue\n// ^^ Rest of ArticleFeedback.vue Component ^^\n\u003Cstyle scoped>\n\n.wrapper {\n\tmargin: 2rem 0;\n\tpadding: 1.5rem;\n\tborder: 1px solid rgba(60, 60, 67, .12);\n\tborder-radius: 8px;\n\tbackground: #f6f6f7;\n}\n\n.step > * + * {\n\tmargin-top: 1rem;\n}\n\n.desc {\n\tdisplay: block;\n\tline-height: 20px;\n\tfont-size: 12px;\n\tfont-weight: 500;\n\tcolor: rgba(60, 60, 67, .75);\n}\n\n.heading {\n\tfont-size: 1.2rem;\n\tfont-weight: 700;\n}\n\n.button-container {\n\tdisplay: grid;\n\tgrid-gap: 0.5rem;\n}\n\n.btn {\n\tborder: 1px solid solid rgba(60, 60, 67, .12);\n\tbackground-color: #ffffff;\n\tborder-radius: 8px;\n\ttransition: border-color 0.25s, background-color 0.25s;\n\tdisplay: inline-block;\n\tfont-size: 14px;\n\tfont-weight: 500;\n\tline-height: 1.5;\n\tmargin: 0;\n\tpadding: 0.375rem 0.75rem;\n\ttext-align: center;\n\tvertical-align: middle;\n\twhite-space: nowrap;\n}\n\n.btn:disabled {\n\topacity: 0.5;\n}\n\n.btn:hover {\n\tborder-color: #6644ff;\n}\n\n.btn-primary {\n\tcolor: #fff;\n\tbackground-color: #6644ff;\n\tborder-color: #6644ff;\n}\n\n.btn-primary:hover {\n\tbackground-color: #4422dd;\n\tborder-color: #4422dd;\n}\n\n.input {\n\twidth: 100%;\n\theight: 100px;\n\tborder: 1px solid #ccc;\n\tborder-radius: 4px;\n\tpadding: 0.375rem 0.75rem;\n}\n\n@media screen and (min-width: 768px) {\n\t.button-container {\n\t\tgrid-template-columns: repeat(4, 1fr);\n\t}\n}\n\u003C/style>\n```\n\n### Adding Submission Logic Inside The Vue Component\n\nWe’re going to write a handler function to actually submit our data to our Directus `docs_feedback` collection.\n\nAt the end of our `\u003Cscript>` tag, let’s add our submission handler.\n\n```vue\nasync function handleSubmission(rating?: number) {\n\tloading.value = true;\n\tif (rating) feedback.rating = rating;\n\n\tconst body = {\n\t\tid: feedback.id,\n\t\trating: feedback.rating,\n\t\tcomments: feedback.comments,\n\t\ttitle: props.title,\n\t\turl: props.url,\n\t};\n\n\t// Replace this with your own Directus URL\n\tconst directusBaseUrl = 'https://yourdirectusurl.directus.app';\n\n\ttry {\n\t\tlet response;\n\n\t\t// If we've already created a feedback record, we'll update it with the new rating or comments.\n\t\tif (feedback.id) {\n\t\t\tresponse = await fetch(`${directusBaseUrl}/items/docs_feedback/${feedback.id}`, {\n\t\t\t\tmethod: 'PUT',\n\t\t\t\tbody: JSON.stringify(body),\n\t\t\t});\n\t\t} else {\n\t\t\tresponse = await fetch(`${directusBaseUrl}/items/docs_feedback/${feedback.id}`, {\n\t\t\t\tmethod: 'POST',\n\t\t\t\tbody: JSON.stringify(body),\n\t\t\t});\n\t\t}\n\n\t\tconst data = await response.json();\n\t\tfeedback.id = data.id;\n\n\t\t// If the reponse has comments, we can assume they've completed the second step. So we'll show the success message.\n\t\tif (data.comments) {\n\t\t\tsuccess.value = true;\n\t\t}\n\t} catch (err) {\n\t\terror.value = err;\n\t} finally {\n\t\tloading.value = false;\n\t}\n}\n```\n\nThis function `handleSubmission` accepts an optional rating and then conditionally creates a new feedback item or updates depending on which step the user completed.\n\nWe also need to update our template to call our handler using the `@click` directive.\n\n```vue\n\u003Ctemplate>\n\t\u003Cdiv class=\"wrapper\">\n\t\t\u003CTransition name=\"fade\" mode=\"out-in\">\n\t\t\t\u003Cdiv v-if=\"!feedback.rating\" class=\"step\">\n\t\t\t\t\u003Cdiv>\n\t\t\t\t\t\u003Cdiv>\n\t\t\t\t\t\t\u003Cp class=\"desc\">How can we improve?\u003C/p>\n\t\t\t\t\t\t\u003Cp class=\"heading\">How helpful was this article?\u003C/p>\n\t\t\t\t\t\u003C/div>\n\t\t\t\t\u003C/div>\n\t\t\t\t\u003Cdiv class=\"button-container\">\n\t\t\t\t\t\u003Cbutton v-for=\"item in ratingOptions\"\n\t\t\t\t\t\t:key=\"item.value\"\n\t\t\t\t\t\tclass=\"btn\"\n\t\t\t\t\t\t@click=\"handleSubmission(item.value)\"> // [!code ++]\n\t\t\t\t\t\t\u003Cspan>{{ item.label }}\u003C/span>\n\t\t\t\t\t\u003C/button>\n\t\t\t\t\u003C/div>\n\t\t\t\u003C/div>\n\t\t\t\u003Cdiv v-else-if=\"feedback.rating && !success\" class=\"step\">\n\t\t\t\t\u003Cdiv>\n\t\t\t\t\t\u003Cp class=\"desc\">This article is\u003C/p>\n\t\t\t\t\t\u003Cdiv>\n\t\t\t\t\t\t\u003Cspan>{{ getRatingOption(feedback.rating)?.label }}\u003C/span>\n\t\t\t\t\t\t\u003Cbutton style=\"margin-left: 0.5rem\" class=\"btn\" @click=\"feedback.rating = undefined\">\n\t\t\t\t\t\t\t\u003Cspan mi icon>close\u003C/span>\n\t\t\t\t\t\t\u003C/button>\n\t\t\t\t\t\u003C/div>\n\t\t\t\t\u003C/div>\n\t\t\t\t\u003Cp class=\"heading\">{{ getRatingOption(feedback.rating)?.message }}\u003C/p>\n\t\t\t\t\u003Ctextarea v-model=\"feedback.comments\" autofocus class=\"input\" />\n\t\t\t\t\u003Cbutton\n\t\t\t\t\tclass=\"btn btn-primary\"\n\t\t\t\t\t:disabled=\"!feedback.comments\"\n\t\t\t\t\t@click=\"handleSubmission()\"> // [!code ++]\n\t\t\t\t\tSend Us Your Feedback\n\t\t\t\t\u003C/button>\n\t\t\t\u003C/div>\n\t\t\t\u003Cdiv v-else class=\"step\">\n\t\t\t\t\u003Cp class=\"heading\">Thanks for your feedback!\u003C/p>\n\t\t\t\u003C/div>\n\t\t\u003C/Transition>\n\t\u003C/div>\n\u003C/template>\n```\n\nSweet! Now there’s just one last step before we have a working component.\n\n## Updating Permissions inside Directus\n\nRight now, if we try to submit some feedback, we’re probably to going receive an `Permission denied` error from Directus.\n\nThis is because all collections have zero public permissions by default. While this is great for security, it’s not so great if we want to store our feedback data.\n\nOpen up the Public role with the [Access Control settings](/guides/auth/access-control). Then scroll to find the `docs_feedback` collection.\n\n![Directus Roles and Permissions settings page, the docs_feedback collection is highlighted and all CRUD permission settings are set to not allowed](/img/61bf4b98-d0e6-4682-b523-b4893065ecfe.webp)\n\n**Create and Update Operations**\n\nClick the :icon{name=\"material-symbols:block\"} button inside each column and choose :icon{name=\"material-symbols:check\"} All Access.\n\n**Read Operation**\n\nWe might not want any prying eyes to be able to read the actual feedback ratings and content, so we’ll use some custom permissions to restrict the fields that anyone can ‘read’.\n\nClick the button for the Read column, and choose Custom Permissions.\n\nOn the Field Permissions tab, check only the `id` field.\n\n![Custom permission settings screen for docs_feedback Read operation. List of fields with checkboxes but only the id field is checked.](/img/3e56d4d1-062a-4dc3-8508-fa6cf36fc280.webp)\n\nWhen you’re all done, it should look like this screenshot.\n\n![Directus Roles and Permissions settings page, the docs_feedback collection is highlighted, Create and Update operation permissions are set to Allowed, Read operation has custom permissions](/img/80d24253-ace1-46dc-8c04-9421449b8552.webp)\n\nAwesome! Now on to testing.\n\n## Testing the Feedback Widget\n\nLet’s open this up our Vue app and our Directus instance to test that everything is working as intended.\n\n![Demo of the Vue feedback widget being used](/img/d01e883f-2813-4f62-a810-b41a87f011b5.gif)\n\nMake sure you check that the form submissions are correct inside Directus.\n\n![A Directus detail page for the an item in docs_feedback collection](/img/d5b600f1-39ff-4914-9e2d-d50c70f9fae9.webp)\n\n## Next Steps\n\nHere’s a few of the next steps you may want to explore beyond this tutorial.\n\n### Analyze the Data Using Directus Insights\n\nCollecting feedback is just one half of the equation. Analyzing and taking action on the data you receive is the more important part.\n\nOur module for creating [no-code dashboards - Directus Insights](/guides/insights/overview) - can help you understand the data you collect much easier and faster than browsing through a list of feedback.\n\n### Secure form submissions\n\nTo post our form submissions, we just enabled Public create and update access for the `docs_feedback` collection inside Directus.\n\nThere’s not a lot to gain by spamming documentation feedback submissions but you never know with folks these days.\n\n**Security wise - we could do better.**\n\nHere’s a few options:\n\n- Create a Flow with using an incoming webhook trigger that processes the incoming requests.\n- Obscure our Directus instance URL by using a proxy or serverless function to make the call to the Directus API. Netlify, Vercel, and other hosting static site hosting platforms simplify this process.\n\n### Add a session identifier to track feedback from the same user\n\nIt could be very handy to know if feedback across different articles is coming from the same user.  We don’t really need full blown user sessions stored in the database for this. We could implement it client-side by:\n\n- adding a field to for `session_id` or `visitor_id` to our collection inside Directus\n- generating a random ID on a first visit or feedback submission inside the Vue app\n- storing the ID within the browser using [localStorage](https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage) or [sessionStorage](https://developer.mozilla.org/en-US/docs/Web/API/Window/sessionStorage)\n- grabbing that ID and passing it in the API call to Directus\n\nI hope you find this post useful - if you have any questions feel free to join [our community platform](https://community.directus.io).\n",{"title":1421,"description":1424},[2054],"XHYU2orO7cap3Pebo7XPPVbj9vKmyu5jvV_BltUKAxY",1775038777808]