TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Codefied-CodePix/KaroCar-platform/llms.txt
Use this file to discover all available pages before exploring further.
Button component is a client-side React button that displays an alert with the consuming app’s name on click. It accepts a required appName prop to identify the calling application, making it easy to trace which app surfaced the interaction during development. Because it calls the browser’s alert API, it is marked with the "use client" directive and must be rendered in a client component context.
TypeScript interface
Props
The content rendered inside the button element — typically a text label or icon.
One or more CSS class names applied to the underlying
<button> element. Use this to apply Tailwind utility classes or any custom styles from the consuming app.The name of the application consuming the component. This value is interpolated into the alert message:
Hello from your ${appName} app!Usage
Source code
Button is decorated with the "use client" directive because its onClick handler calls the browser-only alert API. It cannot be rendered as a React Server Component — ensure any page or layout that includes it is itself a client component, or wrap it in a dedicated client boundary.