### Install Medusa UI Package Source: https://github.com/medusajs/ui/blob/develop/packages/ui/README.md This command installs the Medusa UI package using yarn. Ensure you have Node.js and yarn installed. This is the primary step to begin using Medusa UI components in your project. ```sh yarn add @medusajs/medusa-ui ``` -------------------------------- ### Basic Medusa UI Button Usage Source: https://github.com/medusajs/ui/blob/develop/packages/ui/README.md This JSX code demonstrates how to import and use the Button component from Medusa UI. It requires React and the @medusajs/medusa-ui package to be installed. The example shows rendering a primary variant of the button. ```jsx import { Button } from "@medusajs/ui" const App = () => ``` -------------------------------- ### Install Medusa UI Packages (Bash) Source: https://context7.com/medusajs/ui/llms.txt Commands to install the core Medusa UI packages using either Yarn or npm. These packages include the main UI components, icon library, and the Tailwind CSS preset. ```bash # Install all required packages yarn add @medusajs/ui @medusajs/icons @medusajs/ui-preset # Or with npm npm install @medusajs/ui @medusajs/icons @medusajs/ui-preset ``` -------------------------------- ### Application Setup with Medusa UI Toast Provider (TypeScript/React) Source: https://context7.com/medusajs/ui/llms.txt Demonstrates how to set up the Medusa UI application with necessary styles and the `Toaster` component. This ensures notifications are displayed correctly within the application layout. ```tsx // app.tsx or main entry file import "@medusajs/ui/styles.css" import { Toaster } from "@medusajs/ui" export function App() { return (
Add a new product to your catalog
{user.email}
Orders
{user.stats.orders}
Events
{user.stats.events}
Team Members
Manage your product inventory
Product creation form would go here...
Total Products
{products.length}
In Stock
{products.filter(p => p.status === "in-stock").length}
Low Stock
{products.filter(p => p.status === "low-stock").length}
Card content using design system colors
const greeting = "Hello World"
{/* Tag/badge colors from preset */}
{message}