### Install Content Studio UI with Yarn Source: https://cs-ui-library.netlify.app/index Installs the Content Studio UI library using Yarn. This is an alternative to npm for package management. ```bash yarn add @contentStudio/ui ``` -------------------------------- ### Install Content Studio UI with npm Source: https://cs-ui-library.netlify.app/index Installs the Content Studio UI library using npm. This is the first step to integrate the UI components into your project. ```bash npm install @contentStudio/ui ``` -------------------------------- ### Basic Card Example Source: https://cs-ui-library.netlify.app/components/card A fundamental example of a Card displaying an image, title, sale badge, description, and a call-to-action button. It utilizes Card sections and various styling props. ```vue ``` -------------------------------- ### Basic Drawer Usage Example Source: https://cs-ui-library.netlify.app/components/drawer A simple example showcasing the basic usage of the Drawer component. It includes a button to toggle the drawer and configures basic properties like title and onClose handler. The drawer contains sample content and a close button. ```vue ``` -------------------------------- ### Avatar with Image Examples Source: https://cs-ui-library.netlify.app/components/avatar Provides examples of Avatar components displaying images using the 'src' prop, with variations in size and styling like 'outline'. Includes handling for potentially invalid image URLs. ```html ``` -------------------------------- ### Basic ListItem Examples (Vue) Source: https://cs-ui-library.netlify.app/components/list-item Demonstrates the basic usage of the ListItem component in Vue. Includes examples for a regular, selected, and disabled list item. The ListItem component likely handles internal state management for selection and disabling. ```vue ``` -------------------------------- ### Playground Badge Example - Vue Source: https://cs-ui-library.netlify.app/components/badge A basic example of the Badge component usage in a playground environment, demonstrating size and radius props in Vue.js. ```vue Badge ``` -------------------------------- ### Basic SplitButton Usage Example Source: https://cs-ui-library.netlify.app/components/split-button Illustrates the fundamental structure of a SplitButton, including handling primary click events and rendering a dropdown menu with list items. This example uses Vue.js syntax. ```vue ``` -------------------------------- ### Display Basic Toast Notifications Source: https://cs-ui-library.netlify.app/components/toast Provides examples of displaying different types of toast notifications: default, success, info, warning, and error. Each example uses the `cstuToast.show()` method with a specific message. ```javascript import { cstuToast } from '@contentstudio/ui' const showDefaultToast = () => { cstuToast.show("This is a default toast notification!") } const showSuccessToast = () => { cstuToast.success("Operation completed successfully!") } const showInfoToast = () => { cstuToast.info("Here is some important information.") } const showWarningToast = () => { cstuToast.warning("Please be cautious with this action.") } const showErrorToast = () => { cstuToast.error("An error occurred during the process.") } ``` -------------------------------- ### HoverCard User Profile Example Source: https://cs-ui-library.netlify.app/components/hover-card A practical example showcasing the HoverCard used to display a user's profile information, including an avatar, name, role, and a short bio. ```html ``` -------------------------------- ### Runtime Theme Switching with useTheme Source: https://cs-ui-library.netlify.app/theme-provider Shows how to use the `useTheme` composable to access the current theme and dynamically update it at runtime. This example defines a function to switch to a 'vibrant' theme. ```javascript import { useTheme } from '@contentstudio/ui' const { theme, setTheme } = useTheme() function switchToVibrantTheme() { setTheme({ primary: '#8b5cf6', secondary: '#ec4899', success: '#06d6a0', warning: '#ffd23f', danger: '#f72585', info: '#4cc9f0' }) } ``` -------------------------------- ### Setup Content Studio UI in main.ts Source: https://cs-ui-library.netlify.app/index Configures the Content Studio UI library by importing its CSS and mounting the Vue application. Ensure this is done in your main application entry file. ```typescript import { createApp } from 'vue' import App from './App.vue' import '@contentStudio/ui/dist/style.css' const app = createApp(App) app.mount('#app') ``` -------------------------------- ### Alert with Icon Example (Vue) Source: https://cs-ui-library.netlify.app/components/alert Demonstrates how to include an icon within an Alert component, using the 'icon' slot. This example shows a success alert with a checkmark icon. ```vue ``` -------------------------------- ### Avatar Sizes Example Source: https://cs-ui-library.netlify.app/components/avatar Illustrates various sizes for the Avatar component, ranging from 'sm' to '5xl', using the 'size' prop. Each avatar displays initials. ```html ``` -------------------------------- ### Popover Basic Usage Example Source: https://cs-ui-library.netlify.app/components/popover Demonstrates the basic usage of the Popover component with a primary color, a title, and content. It includes a Button as the trigger. ```vue ``` -------------------------------- ### Basic Textarea Usage Source: https://cs-ui-library.netlify.app/components/textarea Shows a basic implementation of the Textarea component with a label and placeholder. This example illustrates the fundamental props for rendering a simple text input area. ```html