The IFrame Component allows you to embed external web content within your application. It provides a secure way to display content from other websites, HTML documents, or web applications while maintaining separation between the embedded content and your main application. This component is ideal for integrating third-party tools, displaying documentation, embedding dashboards, or showing any other web content that needs to be incorporated into your application.
src - Specifies the URL or path of the content to be displayed in the IFrame. This property supports template expressions to make the source dynamic based on context data. For example, "https://example.com/reports" will embed the reports page, while "${context.reportUrl}" would use a URL from the current context. This property is crucial as it determines what content will be displayed in the IFrame.
width - Sets the width of the IFrame in pixels or percentages. For example, "800px" creates a fixed-width IFrame, while "100%" makes the IFrame expand to fill the width of its container. Setting the appropriate width ensures the embedded content is displayed correctly within your layout.
height - Sets the height of the IFrame in pixels or percentages. For example, "600px" creates a fixed-height IFrame, while "100%" makes the IFrame expand to fill the height of its container. Setting a proper height prevents unnecessary scrolling and ensures the embedded content is fully visible.
paddingClass - Configures spacing around the IFrame using CSS classes. For example, "p-4" adds medium padding on all sides of the component, improving its visual integration within its container.
id - Specifies a unique identifier for the component used for programmatic access. For example, "paymentGatewayFrame" enables targeted manipulation of this specific IFrame component through scripts or automated tests.
dataTestId - Sets the testing hook ID for automated testing. For example, setting to "payment-gateway-iframe" allows test scripts to reliably locate this component during automated testing.
enableAsHotspot - Enables the component as a guided tour hotspot. When enabled, the IFrame can be highlighted during onboarding or tutorial flows to draw user attention to important embedded content.
guidedTourHotSpotTitle - Sets the title for the guided tour hotspot, supporting translations. For example, {"en-US": "Payment Gateway", "de-DE": "Zahlungs-Gateway"} provides clear identification during guided tours.
guidedTourHotSpotDescription - Sets the description for the guided tour hotspot, supporting translations. For example, {"en-US": "This area displays our secure payment processing system", "de-DE": "Dieser Bereich zeigt unser sicheres Zahlungsabwicklungssystem"} provides detailed instructions during guided tours.