!important
to your CSS overrides to ensure they take
+ precedence over the component's default styles.
+ >
+ }
+/>
+
+```css title="Override banner CSS classes"
+/* Banner container */
+.knock-guide-banner {
+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
+ color: white;
+ padding: 16px 24px;
+ border-radius: 8px;
+ margin-bottom: 16px;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+}
+
+/* Banner message content */
+.knock-guide-banner__message {
+ flex: 1;
+ min-width: 0;
+}
+
+.knock-guide-banner__title {
+ font-size: 16px;
+ font-weight: 600;
+ line-height: 1.4;
+ margin-bottom: 4px;
+ color: var(--knock-guide-title-color);
+}
+
+.knock-guide-banner__body {
+ font-size: 14px;
+ line-height: 1.5;
+ color: var(--knock-guide-body-color);
+}
+
+.knock-guide-banner__body p:first-child {
+ margin-top: 0;
+}
+
+.knock-guide-banner__body p:last-child {
+ margin-bottom: 0;
+}
+
+/* Banner actions */
+.knock-guide-banner__actions {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ gap: 12px;
+}
+
+.knock-guide-banner__action {
+ padding: 8px 16px;
+ border-radius: 6px;
+ font-size: 14px;
+ font-weight: 500;
+ text-decoration: none;
+ cursor: pointer;
+ border: 1px solid transparent;
+ background: var(--knock-guide-accent);
+ color: white;
+}
+
+.knock-guide-banner__action--secondary {
+ background: transparent;
+ color: var(--knock-guide-accent);
+ border: 1px solid var(--knock-guide-accent);
+}
+
+/* Close button */
+.knock-guide-banner__close {
+ background: transparent;
+ border: none;
+ cursor: pointer;
+ padding: 8px;
+ color: var(--knock-guide-text-muted);
+}
+```
+
+### Individual subcomponents
+
+For maximum flexibility while still leveraging Knock's functionality, you can use the individual subcomponents to compose your own banner. This approach gives you full control over the layout and styling while maintaining the guide behavior:
+
+```tsx title="Compose your own banner with subcomponents"
+import {
+ useGuide,
+ BannerContainer,
+ BannerContent,
+ BannerText,
+ BannerActions,
+ BannerButton,
+ BannerCloseButton,
+} from "@knocklabs/react";
+import { useEffect } from "react";
+
+const CustomBanner = () => {
+ const { step } = useGuide({ type: "banner" });
+
+ useEffect(() => {
+ if (step) step.markAsSeen();
+ }, [step]);
+
+ if (!step) return null;
+
+ return (
+ {step.content.body}
+{step.content.body}
+ {step.content.primary_button && ( + + )} +!important
to your CSS overrides to ensure they take
+ precedence over the component's default styles.
+ >
+ }
+/>
+
+```css title="Override card CSS classes"
+/* Card container */
+.knock-guide-card {
+ background: white;
+ border: 1px solid var(--knock-guide-border);
+ border-radius: 12px;
+ padding: 20px;
+ margin: 16px 0;
+ box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
+ display: flex;
+ flex-direction: column;
+}
+
+/* Card header */
+.knock-guide-card__header {
+ display: flex;
+ align-items: flex-start;
+ justify-content: space-between;
+ margin-bottom: 12px;
+}
+
+.knock-guide-card__headline {
+ font-size: 18px;
+ font-weight: 600;
+ line-height: 1.4;
+ color: var(--knock-guide-title-color);
+ margin: 0;
+}
+
+/* Card message content */
+.knock-guide-card__message {
+ flex: 1;
+ display: flex;
+ flex-direction: column;
+ align-items: flex-start;
+}
+
+.knock-guide-card__title {
+ font-size: 16px;
+ font-weight: 600;
+ line-height: 1.4;
+ color: var(--knock-guide-title-color);
+ margin-bottom: 8px;
+}
+
+.knock-guide-card__body {
+ font-size: 14px;
+ line-height: 1.5;
+ color: var(--knock-guide-body-color);
+ margin-bottom: 16px;
+}
+
+/* Card image */
+.knock-guide-card__img {
+ display: block;
+ max-width: 100%;
+ height: auto;
+ margin-bottom: 16px;
+ border-radius: 8px;
+}
+
+/* Card actions */
+.knock-guide-card__actions {
+ display: flex;
+ align-items: center;
+ justify-content: flex-start;
+ gap: 12px;
+ margin-top: auto;
+}
+
+.knock-guide-card__action {
+ padding: 8px 16px;
+ border-radius: 6px;
+ font-size: 14px;
+ font-weight: 500;
+ text-decoration: none;
+ cursor: pointer;
+ border: 1px solid transparent;
+ background: var(--knock-guide-accent);
+ color: white;
+}
+
+.knock-guide-card__action--secondary {
+ background: transparent;
+ color: var(--knock-guide-accent);
+ border: 1px solid var(--knock-guide-accent);
+}
+
+/* Close button */
+.knock-guide-card__close {
+ background: transparent;
+ border: none;
+ cursor: pointer;
+ padding: 8px;
+ color: var(--knock-guide-text-muted);
+}
+```
+
+### Individual subcomponents
+
+For maximum flexibility while still leveraging Knock's functionality, you can use the individual subcomponents to compose your own card. This approach gives you full control over the layout and styling while maintaining the guide behavior:
+
+```tsx title="Compose your own card with subcomponents"
+import {
+ useGuide,
+ CardContainer,
+ CardHeader,
+ CardTitle,
+ CardBody,
+ CardFooter,
+ CardButton,
+ CardCloseButton,
+} from "@knocklabs/react";
+import { useEffect } from "react";
+
+const CustomCard = () => {
+ const { step } = useGuide({ type: "card" });
+
+ useEffect(() => {
+ if (step) step.markAsSeen();
+ }, [step]);
+
+ if (!step) return null;
+
+ return (
+ {step.content.body}
+{step.content.body}
+ {step.content.primary_button && ( + + )} +!important
to your CSS overrides to ensure they take
+ precedence over the component's default styles.
+ >
+ }
+/>
+
+```css title="Override modal CSS classes"
+/* Modal overlay */
+.knock-guide-modal__overlay {
+ background: rgba(0, 0, 0, 0.8);
+ backdrop-filter: blur(4px);
+}
+
+/* Modal container */
+.knock-guide-modal {
+ border-radius: 12px;
+ box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
+ max-width: 600px;
+}
+
+/* Modal content areas */
+.knock-guide-modal__header {
+ border-bottom: 1px solid var(--knock-guide-border);
+ padding-bottom: 16px;
+}
+
+.knock-guide-modal__title {
+ font-size: 20px;
+ font-weight: 600;
+ color: var(--knock-guide-title-color);
+}
+
+.knock-guide-modal__body {
+ padding: 24px 0;
+ line-height: 1.6;
+ color: var(--knock-guide-body-color);
+}
+
+.knock-guide-modal__actions {
+ display: flex;
+ gap: 12px;
+ justify-content: flex-end;
+}
+
+/* Action buttons */
+.knock-guide-modal__action {
+ background: var(--knock-guide-accent);
+ color: white;
+ border: none;
+ border-radius: 6px;
+ padding: 12px 24px;
+ font-weight: 600;
+ cursor: pointer;
+}
+
+.knock-guide-modal__action--secondary {
+ background: transparent;
+ color: var(--knock-guide-accent);
+ border: 2px solid var(--knock-guide-accent);
+}
+
+/* Close button */
+.knock-guide-modal__close {
+ background: transparent;
+ border: none;
+ cursor: pointer;
+ padding: 8px;
+ color: var(--knock-guide-text-muted);
+}
+
+/* Image styling */
+.knock-guide-modal__img {
+ width: 100%;
+ height: auto;
+ border-radius: 8px;
+}
+```
+
+### Individual subcomponents
+
+For maximum flexibility while still leveraging Knock's functionality, you can use the individual subcomponents to compose your own modal. This approach gives you full control over the layout and styling while maintaining the guide behavior:
+
+```tsx title="Compose your own modal with subcomponents"
+import {
+ useGuide,
+ ModalOverlay,
+ ModalContainer,
+ ModalHeader,
+ ModalBody,
+ ModalFooter,
+ ModalCloseButton,
+} from "@knocklabs/react";
+import { useEffect } from "react";
+
+const CustomModal = () => {
+ const { step } = useGuide({ type: "modal" });
+
+ useEffect(() => {
+ if (step) step.markAsSeen();
+ }, [step]);
+
+ if (!step) return null;
+
+ return (
+ {step.content.body}
+{step.content.body}
+ {step.content.primary_button && ( + + )} +