### Chip Examples Source: https://shurikenui.com/docs/components/chip Examples demonstrating the usage of the Chip component's props. ```APIDOC ## Chip Examples ### Chip Placement Use the `placement` prop to change the chip's placement relative to the element it wraps. ```html ``` ### Chip Offset Use the `offset` prop to move the chip from its default position. ```html ``` ### Chip Colors Use the `color` prop to change the chip's color. Set it to `custom` to use a custom color. ```html ``` ### Pulse Animation Use the `pulse` prop to add a pulse animation to the chip. ```html ``` ``` -------------------------------- ### Install Dependencies with pnpm Source: https://shurikenui.com/docs/advanced/contributing Installs the project's dependencies using pnpm. This command should be run after cloning the repository. ```bash pnpm install ``` -------------------------------- ### Default tailwind.config.js Example Source: https://shurikenui.com/docs/components/prose Demonstrates the default structure of a tailwind.config.js file, commonly used for configuring Tailwind CSS. This example shows the basic setup for purging unused styles, extending theme properties, defining variants, and including plugins. ```javascript module.exports = { purge: [], theme: { extend: {}, }, variants: {}, plugins: [], } ``` -------------------------------- ### Toast Provider Setup Source: https://shurikenui.com/docs/components/toast Example of setting up the `BaseProviders` component to manage toast notifications, including maximum toast count and position. ```APIDOC ## POST /websites/shurikenui/toast/provider ### Description This section shows how to configure the `BaseProviders` component for toast notifications, specifying the maximum number of toasts and their display position. ### Method POST ### Endpoint /websites/shurikenui/toast/provider ### Parameters #### Request Body - **toast** (object) - Configuration object for toast notifications. - **max** (number) - Optional - The maximum number of toasts to display at once. Defaults to 3. - **position** (string) - Optional - The position of the toasts on the screen. Accepts 'top-center', 'top-left', 'top-right', 'bottom-center', 'bottom-left', 'bottom-right'. Defaults to 'top-center'. ### Request Example ```json { "toast": { "max": 3, "position": "top-center" } } ``` ### Response #### Success Response (200) - **message** (string) - Confirmation that the toast provider has been configured. #### Response Example ```json { "message": "Toast provider configured successfully" } ``` ``` -------------------------------- ### Install Shuriken UI and Tailwind CSS Source: https://shurikenui.com/docs/installation Command to install Shuriken UI and Tailwind CSS as development dependencies in a Nuxt project using pnpm. ```bash pnpm add -D @shuriken-ui/nuxt@next tailwindcss ``` -------------------------------- ### Snack Component Examples Source: https://shurikenui.com/docs/components/snack Examples demonstrating how to use the Snack component with different sizes. ```APIDOC ## Snack Component Examples ### Size Use the `size` prop to change size of the snack. #### Examples ##### Size xs ```vue ``` ##### Size sm ```vue ``` ##### Size md ```vue ``` ``` -------------------------------- ### Vue Placeholder Page: Starting Soon Example Source: https://shurikenui.com/docs/components/placeholder Demonstrates the use of the BasePlaceholderPage component in Vue.js to display a 'Starting Soon' message with cancel and confirm buttons. It utilizes slots for image and content customization. ```vue ``` -------------------------------- ### Tag Component Examples Source: https://shurikenui.com/docs/components/tag Examples demonstrating the usage of the size and rounded props for the Shuriken UI Tag component. ```APIDOC ## Tag Component Examples ### Size Use the `size` prop to change the size of the tag. ```html ``` ### Radius and Variant Use the `variant` prop to change the variant of the tag. ```html ``` ``` -------------------------------- ### Install Tailwind Typography Plugin Source: https://shurikenui.com/docs/components/prose Installs the @tailwindcss/typography plugin as a development dependency using pnpm. ```shell pnpm add -D @tailwindcss/typography ``` -------------------------------- ### Message Component Examples Source: https://shurikenui.com/docs/components/message Examples demonstrating how to use the `variant` prop to control the color of the message component. ```APIDOC ## Message Component Examples ### Type Use the `variant` prop to control the color of the message. #### Default Message ```vue ``` #### Primary Message ```vue ``` #### Success Message ```vue ``` #### Info Message ```vue ``` #### Warning Message ```vue ``` #### Destructive Message ```vue ``` ``` -------------------------------- ### Install Corepack with npm Source: https://shurikenui.com/docs/advanced/contributing Installs Corepack globally using npm. This command is necessary if your Node.js version is below v16.9.x. ```bash npm install -g corepack ``` -------------------------------- ### Create New Nuxt Project Source: https://shurikenui.com/docs/installation Command to create a new Nuxt.js project using pnpm and navigate into the project directory. ```bash pnpm dlx nuxi@latest init my-shuriken-app cd my-shuriken-app ``` -------------------------------- ### Button Component - Link Example Source: https://shurikenui.com/docs/components/button Shows how to use the Button component as a link by utilizing the 'to' prop. ```APIDOC ## POST /websites/shurikenui/components/button/link ### Description This endpoint demonstrates how to use the Button component as a navigation link. By providing a URL to the `to` prop, the button will render as an anchor tag (``). ### Method POST ### Endpoint /websites/shurikenui/components/button/link ### Parameters #### Request Body - **slot** (any) - Required - The content to be displayed as the link text. - **to** (string) - Required - The URL to navigate to. - **size** (string) - Optional - The size of the button. Allowed values: "sm", "md", "lg", "xl", "icon-sm", "icon-md", "icon-lg", "icon-xl". Defaults to "md". ### Request Example { "slot": "Google.com", "to": "https://google.com", "size": "md" } ### Response #### Success Response (200) - **html_output** (string) - The HTML representation of the button rendered as a link. #### Response Example { "html_output": "Google.com" } ``` -------------------------------- ### Run Development Server Source: https://shurikenui.com/docs/advanced/contributing Starts the development server for the Nuxt playground app, allowing you to test changes to Shuriken UI Nuxt in real-time. ```bash pnpm dev ``` -------------------------------- ### Configure Tailwind CSS and Shuriken UI Theme Source: https://shurikenui.com/docs/installation Main CSS file (`~/assets/css/main.css`) to import Tailwind CSS and the Shuriken UI theme. ```css @import 'tailwindcss'; @import '@shuriken-ui/nuxt'; ``` -------------------------------- ### Install @nuxt/fonts Module Source: https://shurikenui.com/docs/theming/typography Installs the `@nuxt/fonts` module as a development dependency in your Nuxt.js project. ```bash pnpm add -D @nuxt/fonts ``` -------------------------------- ### Slider Examples Source: https://shurikenui.com/docs/components/slider Examples demonstrating the usage of different variants, multiple handles, and orientations for the Shuriken UI Slider component. ```APIDOC ## Slider Examples ### Variants Use the `variant` prop to change the color of the progress bar. Set it to `none` to remove the default color and apply your own. ```vue ``` ### Multiple handles Use the `v-model` prop to set the value of the slider. You can also use an array to set multiple values. ```vue ``` ### Orientation Use the `orientation` prop to change the direction of the slider. Set it to `vertical` to make it vertical. ```vue ``` ``` -------------------------------- ### Shuriken UI SwitchBall Variants Example (Vue) Source: https://shurikenui.com/docs/components/switch-ball This Vue component example demonstrates how to use the `variant` prop on the `BaseSwitchBall` component to apply different color schemes ('default', 'primary', 'dark'). It includes the template for rendering switches and the script setup for managing their state. ```vue ``` -------------------------------- ### Placeholder Component - Basic Usage Source: https://shurikenui.com/docs/components/placeholder A basic example of how to use the BasePlaceholderPage component with title, subtitle, and a call-to-action button. ```APIDOC ## BasePlaceholderPage ### Description A placeholder component, for empty states. ### Method N/A (Component Usage) ### Endpoint N/A (Component Usage) ### Parameters #### Props - **title** (string) - Optional - The title of the placeholder. - **subtitle** (string) - Optional - The subtitle of the placeholder. - **image-size** (string) - Optional - The size of the featured image. Allowed values: "xs", "sm", "md", "lg", "xl". Defaults to "xs". - **as-child** (boolean) - Optional - Change the default rendered element for the one passed as a child, merging their props and behavior. - **as** (AsTag | Component) - Optional - The element or component this component should render as. Can be overwritten by `asChild`. #### Slots - **#image** - The slot for the media element (e.g., an image). - **#default** - The default slot for custom content. ### Request Example ```html ``` ### Response #### Success Response (N/A) This is a UI component, no direct API response. #### Response Example N/A ``` -------------------------------- ### BaseInput Component Source: https://shurikenui.com/docs/components/input Documentation for the BaseInput component, including its features, anatomy, API reference, customization, and examples. ```APIDOC ## BaseInput Component ### Description A user input component, providing an editable field. ### Features - Handles model binding - Color customization - Sizes and radius support ### Anatomy This component is self-closing and can be used to create an input field. You can customize the input's visual style by using the available props. ### API Reference This component has props that you can use to modify its visual style and behavior. **Model** | Type | |---| | `string | number` | **Props** | Prop | Type | Default | Description | |---|---|---|---| | `id` | `string` | `-` | The form input identifier. | | `type` | `string` | `"text"` | The type of input. | | `placeholder` | `string` | `-` | The placeholder to display for the input. | | `variant` | `"default" | "muted"` | `"default"` | The variant of the input. | | `rounded` | `"none" | "md" | "sm" | "lg" | "full"` | `"md"` | The radius of the input. | | `size` | `"md" | "sm" | "lg" | "xl"` | `"md"` | The size of the input. | ### Customization Your can override the component default CSS variables in your `main.css` file. ```css @theme { /* Default input variables */ --color-input-default-border: var(--color-muted-300); --color-input-default-bg: var(--color-white); --color-input-default-text: var(--color-muted-600); --color-input-default-placeholder: var(--color-muted-300); --color-input-default-button-bg: var(--color-muted-100); --color-input-default-button-bg-active: var(--color-muted-200); --color-input-default-button-text: var(--color-muted-700); /* Muted input variables */ --color-input-muted-border: var(--color-muted-300); --color-input-muted-bg: var(--color-muted-50); --color-input-muted-text: var(--color-muted-600); --color-input-muted-placeholder: var(--color-muted-300); --color-input-muted-button-bg: var(--color-muted-200); --color-input-muted-button-bg-active: var(--color-muted-300); --color-input-muted-button-text: var(--color-muted-700); } ``` ### Examples #### Size Use the `size` prop to change the size of the input. ```vue ``` ``` -------------------------------- ### VSCode Tailwind CSS IntelliSense Configuration Source: https://shurikenui.com/docs/installation VSCode settings file (`.vscode/settings.json`) to enable Tailwind CSS IntelliSense for better autocompletion in CSS files. ```json { "files.associations": { "*.css": "tailwindcss" }, "editor.quickSuggestions": { "strings": true } } ``` -------------------------------- ### Primitive Field Component - Usage Example Source: https://shurikenui.com/docs/components/primitive-field An example of how to use the BasePrimitiveField component with input, loading, success, and error indicators. ```APIDOC ## GET /websites/shurikenui/components/primitive-field ### Description This endpoint provides documentation and usage examples for the Primitive Field component. ### Method GET ### Endpoint /websites/shurikenui/components/primitive-field ### Request Example ```html ``` ### Response #### Success Response (200) - **Content**: HTML and Vue component code for the Primitive Field. #### Response Example ```html ``` ``` -------------------------------- ### Button as a Link Example (Vue) Source: https://shurikenui.com/docs/components/button Demonstrates how to use the `to` prop with the BaseButton component to render a button that functions as a hyperlink, navigating to a specified URL. ```vue ``` -------------------------------- ### BaseHeading Component Example (Vue) Source: https://shurikenui.com/docs/components/heading Demonstrates the usage of the BaseHeading component in Vue.js, showcasing its props for size, weight, and leading. It can be rendered as any HTML tag. ```vue ``` -------------------------------- ### Add Shuriken UI Base Providers Source: https://shurikenui.com/docs/installation Vue component (`~/app.vue`) to wrap the Nuxt application with Shuriken UI's base providers for context. ```vue ``` -------------------------------- ### BaseInput Component Size Example (Vue) Source: https://shurikenui.com/docs/components/input Illustrates changing the size of the BaseInput component using the 'size' prop. ```vue ``` -------------------------------- ### Placeholder Component - Image Size Example Source: https://shurikenui.com/docs/components/placeholder Illustrates how to adjust the image size within the Placeholder component using the 'image-size' prop. ```APIDOC ## Placeholder Component - Image Size ### Description Use the `image-size` prop to control the width of the image slot within the placeholder component. ### Method N/A (Component Usage) ### Endpoint N/A (Component Usage) ### Parameters #### Props - **image-size** (string) - Optional - The size of the featured image. Allowed values: "xs", "sm", "md", "lg", "xl". Defaults to "xs". ### Request Example ```html ``` ### Response #### Success Response (N/A) N/A #### Response Example N/A ``` -------------------------------- ### Example: Single Accordion Source: https://shurikenui.com/docs/components Demonstrates how to use the Accordion component to display items where only one can be open at a time. ```APIDOC ## Example: Single Accordion ### Description Use the `type="single"` prop to ensure that only one accordion item can be expanded at any given time. This is a common pattern for displaying sequential information. ### Code Example ```vue ``` ``` -------------------------------- ### Primitive Field Usage Example Source: https://shurikenui.com/docs/components/primitive-field Demonstrates a basic implementation of the Primitive Field component, including input binding, placeholder text, and loading/success/error indicators. This example shows how to integrate the Primitive Field with other Shuriken UI input components. ```vue ``` -------------------------------- ### Button Anatomy Example (Vue) Source: https://shurikenui.com/docs/components/button Illustrates the fundamental structure for using the BaseButton component, highlighting that it accepts any content as a child. ```vue ``` -------------------------------- ### Pagination Anatomy Example Source: https://shurikenui.com/docs/components/pagination Illustrates how to customize the pagination layout by using slots to control the placement of navigation buttons and page items. ```APIDOC ## Pagination Anatomy ### Description This example demonstrates customizing the `BasePagination` component's structure using slots. It shows how to explicitly define the layout for the first/previous buttons, page items, and next/last buttons. ### Method N/A (Component Usage) ### Endpoint N/A (Component Usage) ### Parameters N/A (Component Usage) ### Request Example ```html ``` ### Response N/A (Component Usage) ``` -------------------------------- ### Configure Nuxt.js with Shuriken UI Module Source: https://shurikenui.com/docs/installation Nuxt configuration file (`nuxt.config.ts`) to register the Shuriken UI module and specify the main CSS file. ```js export default defineNuxtConfig({ modules: [ '@shuriken-ui/nuxt', ], css: [ '~/assets/css/main.css', ], }) ``` -------------------------------- ### BaseMessage Component Example (Vue) Source: https://shurikenui.com/docs/components/message Demonstrates the basic usage of the BaseMessage component in Vue.js, including setting an icon and rounded corners. ```vue ``` -------------------------------- ### Vue Placeholder Page: Get Notified Example Source: https://shurikenui.com/docs/components/placeholder Illustrates how to use the BasePlaceholderPage component in Vue.js for a 'Get Notified' feature. It includes an input field for email subscription and a primary button to submit. ```vue ``` -------------------------------- ### Dropdown Item with Start Icon Source: https://shurikenui.com/docs/components/dropdown Explains how to insert an icon into a dropdown item using the `#start` slot. This example showcases adding different solar system icons to each dropdown item for visual distinction. ```vue ``` -------------------------------- ### Avatar in Dropdown Item (Vue) Source: https://shurikenui.com/docs/components/dropdown This example shows how to place a BaseAvatar component within the '#start' slot of a BaseDropdownItem. It iterates through multiple dropdown items, each with a unique avatar source and associated user information. ```vue ``` -------------------------------- ### Set BaseSelect to Disabled State (Vue) Source: https://shurikenui.com/docs/components/select Illustrates how to disable the `BaseSelect` component using the `disabled` prop. This prevents user interaction with the select input. The example is written in Vue using template and script setup. ```vue ``` -------------------------------- ### Shuriken UI BaseAutocomplete with BaseField Source: https://shurikenui.com/docs/components/field Illustrates integrating the BaseField component with the BaseAutocomplete component in Vue.js. This setup allows for state management and provides props for input attributes and refs. The example includes a placeholder and a clearable option. ```vue ``` -------------------------------- ### Set BaseSelect to Error State with aria-invalid (Vue) Source: https://shurikenui.com/docs/components/select Demonstrates how to use the `aria-invalid` prop on the `BaseSelect` component to indicate an error state. This is useful for accessibility and user feedback. The example uses Vue's template and script setup syntax. ```vue ``` -------------------------------- ### Set Input File Size with 'size' prop (Vue) Source: https://shurikenui.com/docs/components/input-file Demonstrates how to use the 'size' prop on the BaseInputFile component to control the input's size. The 'md' size is used in this example. It requires a Vue setup with 'ref' for model binding. ```vue ``` -------------------------------- ### Kbd Component Usage Example - Vue Source: https://shurikenui.com/docs/components/kbd Demonstrates how to use the BaseKbd component in Vue to display keyboard shortcuts like Command + K. It showcases the 'variant' and 'size' props for customization. ```vue ``` -------------------------------- ### Input File Component Source: https://shurikenui.com/docs/components/input-file Documentation for the Shuriken UI Input File component, a simple file upload input. ```APIDOC ## Input File Component `` · A simple file upload input ### Description This component provides a basic file upload input functionality. It supports model binding, color customization, and size/radius adjustments. ### Method N/A (This is a UI component, not an API endpoint) ### Endpoint N/A (This is a UI component, not an API endpoint) ### Features * Handles model binding * Color customization * Sizes and radius support ### Anatomy This component is self-closing and can be used to create a file input. You can customize the input's visual style by using the available props. ### API Reference #### Model | Field | Type | |-------------|-------------------| | `model-value` | `FileList | null` | #### Props | Prop | Type | Default | Description | |---------------|------------------------------------------------------------------------------------------|---------|-----------------------------------------------------------------------------| | `id` | `string` | `-` | The form input identifier. | | `placeholder` | `string` | `-` | The placeholder to display for the file input. | | `disabled` | `boolean` | `-` | Whether the input is disabled. | | `multiple` | `boolean` | `-` | Allows multiple files to be selected. | | `text-value` | `((fileList?: FileList | null) => string)` | `-` | Method to return the text value of the file input. | | `variant` | `"default" | "primary" | "muted"` | `"default"` | The variant of the input. | | `rounded` | `"none" | "md" | "sm" | "lg" | "full"` | `"md"` | The radius of the file input. | | `size` | `"md" | "sm" | "lg" | "xl"` | `"md"` | The size of the input. | | `classes` | `{ root?: string | string[]; button?: string | string[]; text?: string | string[]; placeholder?: string | string[]; }` | `{}` | Optional classes to pass to the inner components. | ### Customization Override default CSS variables in your `main.css` file. ```css @theme { /* Default input variables */ --color-input-default-border: var(--color-muted-300); --color-input-default-bg: var(--color-white); --color-input-default-text: var(--color-muted-600); --color-input-default-placeholder: var(--color-muted-300); --color-input-default-button-bg: var(--color-muted-100); --color-input-default-button-bg-active: var(--color-muted-200); --color-input-default-button-text: var(--color-muted-700); /* Muted input variables */ --color-input-muted-border: var(--color-muted-300); --color-input-muted-bg: var(--color-muted-50); --color-input-muted-text: var(--color-muted-600); --color-input-muted-placeholder: var(--color-muted-300); --color-input-muted-button-bg: var(--color-muted-200); --color-input-muted-button-bg-active: var(--color-muted-300); --color-input-muted-button-text: var(--color-muted-700); } ``` ``` -------------------------------- ### Enable Corepack Source: https://shurikenui.com/docs/advanced/contributing Command to enable Corepack, a tool for managing Node.js package manager versions. This is a prerequisite for using pnpm. ```bash corepack enable ``` -------------------------------- ### BaseTag Radius and Variant Examples (Vue) Source: https://shurikenui.com/docs/components/tag Provides examples of using the `variant` prop on the BaseTag component in Vue.js to change its appearance. It showcases different variants including default, muted, primary, and dark. ```vue ``` -------------------------------- ### Vue Nested Typography Formatting Example Source: https://shurikenui.com/docs/theming/typography Illustrates how to achieve rich text formatting by nesting typography components within each other. This example shows how to make specific parts of a paragraph bold using the BaseText component. ```vue ``` -------------------------------- ### Shuriken UI Number Input Rounded Example Source: https://shurikenui.com/docs/components/input-number Shows how to apply rounded borders to the Shuriken UI Number Input using the `rounded` prop. This example sets the border radius to 'full'. ```vue ``` -------------------------------- ### Button Component - Base Usage Source: https://shurikenui.com/docs/components/button Demonstrates the basic usage of the BaseButton component from Shuriken UI. ```APIDOC ## POST /websites/shurikenui/components/button ### Description This endpoint represents the basic usage of the Button component. It shows how to render a simple button with default or specified properties. ### Method POST ### Endpoint /websites/shurikenui/components/button ### Parameters #### Request Body - **slot** (any) - Required - The content to be rendered inside the button. - **size** (string) - Optional - The size of the button. Allowed values: "sm", "md", "lg", "xl", "icon-sm", "icon-md", "icon-lg", "icon-xl". Defaults to "md". ### Request Example { "slot": "Button", "size": "md" } ### Response #### Success Response (200) - **html_output** (string) - The HTML representation of the rendered button. #### Response Example { "html_output": "" } ``` -------------------------------- ### Shuriken UI Number Input Variants Example Source: https://shurikenui.com/docs/components/input-number Illustrates the use of the `variant` prop to change the visual style of the Shuriken UI Number Input. Two examples are provided: 'default' and 'muted'. ```vue ``` -------------------------------- ### Placeholder Component - Anatomy Source: https://shurikenui.com/docs/components/placeholder Demonstrates the structure and slot usage for the Placeholder component, showing where to place media and custom content. ```APIDOC ## Placeholder Component Anatomy ### Description This component accepts any content as a child. You can customize the component visual style by using the available props. The anatomy highlights the primary slots available for customization. ### Method N/A (Component Usage) ### Endpoint N/A (Component Usage) ### Parameters #### Slots - **#image** (any) - Slot for media elements like images. - **#default** (any) - Default slot for any custom content. ### Request Example ```html ``` ### Response #### Success Response (N/A) N/A #### Response Example N/A ``` -------------------------------- ### Shuriken UI Number Input Size Example Source: https://shurikenui.com/docs/components/input-number Demonstrates how to use the `size` prop to control the dimensions of the Shuriken UI Number Input component. The example sets the size to 'md' and provides a placeholder. ```vue ``` -------------------------------- ### Run Project Tests Source: https://shurikenui.com/docs/advanced/contributing Executes the project's tests, including linting, to ensure code quality and functionality after making changes. ```bash pnpm test ``` -------------------------------- ### Kbd Component Source: https://shurikenui.com/docs/components/kbd Documentation for the Kbd component, an abstraction of a keyboard key. It includes features, anatomy, and API reference. ```APIDOC ## Kbd Component An abstraction of a keyboard key. ### Features * Easy to use * Supports variants and sizes ### Anatomy This component can have any children inside its default slot. You can use the provided slots to create a custom `kbd` element. ```vue ``` ### API Reference This component has props that you can use to modify its visual style. #### Props - **variant** (string) - Optional, default: `"default"`. The variant of the kbd. Allowed values: `"default"`, `"none"`, `"muted"`. - **size** (string) - Optional, default: `"md"`. The size of the kbd. Allowed values: `"md"`, `"sm"`, `"lg"`. - **as-child** (boolean) - Optional. Change the default rendered element for the one passed as a child, merging their props and behavior. - **as** (AsTag | Component) - Optional, default: `"kbd"`. The element or component this component should render as. Can be overwritten by `asChild`. #### Slots - **#default** (`any`) - The default slot for the content of the Kbd component. ``` -------------------------------- ### Avatar Group Limit Example Vue Component Source: https://shurikenui.com/docs/components/avatar-group Demonstrates how to manage the number of avatars displayed in an Avatar Group using the `limit` prop in Vue. This example sets the limit to 8, showing a counter if more avatars are provided than the limit. ```vue ```