# Complete documentation of Inspira UI URL: https://inspira-ui.com/docs/index --- title: Home description: Built beautiful websites using Nuxt & Vue icon: "lucide:home" --- # Welcome to Inspira UI Build beautiful websites using Nuxt & Vue. --- Inspira UI is a collection of reusable, animated components powered by [TailwindCSS](https://tailwindcss.com/), [motion-v](https://motion.dev/docs/vue), [gsap](https://gsap.com/) & [threejs](https://threejs.org/) — crafted to help you ship faster and better. Whether you're starting a new project or refining a current one, this is the place to begin. ## Quick Links ::card-group ::card{ icon="lucide:rocket" title="Getting Started" description="Kick off your journey with installation, setup, and usage guides." to="/getting-started"} :: ::card{ icon="lucide:play" title="Installation" description="Explore different ways to install Inspira UI — via CLI, manual import, or copy-paste." to="/getting-started/installation"} :: ::card{ icon="lucide:box" title="Components" description="Browse the full list of components, each with clear documentation and beautiful previews." to="/components"} :: ::card{ icon="lucide:blocks" title="Blocks" description="Discover ready-made layout blocks you can mix and match to build complete sections and pages." to="/blocks"} :: :: ## Join the community We're building this together. Come say hi, share feedback, or contribute! - [**Discord**](https://discord.gg/Xbh5DwJRc9) – Chat with the community and get help - [**X (Formely Twitter)**](https://x.com/rahulv_dev) – Follow for updates and sneak peeks - [**Bluesky**](http://bsky.app/profile/inspira-ui.com) – For indie and alt-web conversations - [**GitHub**](https://github.com/unovue/inspira-ui) – Star the repo to support us! ★ ## Support Us Help us grow and keep Inspira UI thriving 💜 by [**becoming a sponsor**](https://github.com/sponsors/rahul-vashishtha). ## Repo Stats ![Repo Stats](https://repobeats.axiom.co/api/embed/da99e5e9c8ddaaff68b7f57b56ae21d5e0ea2ed2.svg "Repobeats analytics image") ## Thanks to all the contributors 🙏 [![Contributors](https://contrib.rocks/image?repo=unovue/inspira-ui)](https://github.com/unovue/inspira-ui/graphs/contributors) --- Made with ♥ by [Rahul Vashishtha](https://rahulv.dev) and the Vue community. URL: https://inspira-ui.com/docs/getting-started/Introduction --- title: Introduction description: Reusable components built with shadcn-vue, motion-v, and TailwindCSS icon: "lucide:info" --- Welcome to [**Inspira UI**](https://inspira-ui.com), a community-driven project for [Vue](https://vuejs.org)! This collection offers beautifully designed, reusable components, taking inspiration from the amazing work done on both [Aceternity UI](https://ui.aceternity.com) and [Magic UI](https://magicui.design). While we're not officially affiliated with these projects, we have received permission from Aceternity UI's creator to adapt those fantastic designs for the Vue ecosystem. Additionally, Inspira UI includes custom components developed by us and contributed by the community. ### About Inspira UI Inspira UI is **not** a traditional component library. Instead, it's a curated collection of elegant components you can easily integrate into your applications. Simply pick what you need, copy the code, and customize it to fit your project. The code is yours to use and modify as you like! ### Why Inspira UI? This project began to fill a gap in the Vue community for a similar set of components. Inspira UI brings the beauty and functionality of Aceternity UI, Magic UI, and custom contributions to Vue, making it easier for developers to build stunning applications. ### Key Features - Completely [free and open source](https://github.com/unovue/inspira-ui) - Highly [configurable](/components) to meet your design needs - A wide range of [components](/components) to choose from - Optimized for mobile use - Fully compatible with Nuxt ### Acknowledgments Special thanks to: - [Aceternity UI](https://ui.aceternity.com) for inspiring this Vue adaptation. - [Magic UI](https://magicui.design) for their design inspiration. - [shadcn-vue](https://www.shadcn-vue.com/) for the Vue port of shadcn-ui and contributing some components for docs. - [shadcn-docs-nuxt](https://github.com/ZTL-UwU/shadcn-docs-nuxt) for the beautifully crafted Nuxt documentation site. ### About Me Hi, I'm [Rahul Vashishtha](https://rahulv.dev). I started Inspira UI to bring a similar experience to the Vue ecosystem, inspired by Aceternity UI, Magic UI, and community contributions. I'm continuously working on it to make it better. Feel free to check out my work on [GitHub](https://github.com/rahul-vashishtha) and join me on this journey [here](https://github.com/unovue/inspira-ui)! Feel free to explore and enjoy building with Inspira UI! URL: https://inspira-ui.com/docs/getting-started/installation --- title: Installation description: How to install Inspira UI in your app. icon: "lucide:play" --- This guide will help you install and set up Inspira UI components in your Vue or Nuxt application. ::alert{type="warning" title="For Tailwind CSS v3 users"} If you are using Tailwind CSS v3, [Checkout Inspira UI v1 here](https://v1.inspira-ui.com). :: ::alert{type="alert"} **Note:** If you're using `shadcn-vue`, you can skip the installation steps and install only following libraries. ::code-group ```bash [npm] npm install @vueuse/core motion-v ``` ```bash [pnpm] pnpm install @vueuse/core motion-v ``` ```bash [bun] bun add @vueuse/core motion-v ``` ```bash [yarn] yarn add @vueuse/core motion-v ``` :: Follow this guide to setup `motion-v` on [Vue or Nuxt](https://motion.dev/docs/vue). :: ## Getting Started with Inspira UI ::steps ### Set up `tailwindcss` To begin, install `tailwindcss` using this [Vite install guide for Vue](https://tailwindcss.com/docs/installation) or using this [framework-specific guide for Nuxt](https://tailwindcss.com/docs/installation/framework-guides/nuxt). ### Add dependencies Install libraries for tailwindcss and utilities. ::code-group ```bash [npm] npm install -D clsx tailwind-merge class-variance-authority tw-animate-css ``` ```bash [pnpm] pnpm install -D clsx tailwind-merge class-variance-authority tw-animate-css ``` ```bash [bun] bun add -d clsx tailwind-merge class-variance-authority tw-animate-css ``` ```bash [yarn] yarn add --dev clsx tailwind-merge class-variance-authority tw-animate-css ``` :: Install VueUse and other supporting libraries. ::code-group ```bash [npm] npm install @vueuse/core motion-v ``` ```bash [pnpm] pnpm install @vueuse/core motion-v ``` ```bash [bun] bun add @vueuse/core motion-v ``` ```bash [yarn] yarn add @vueuse/core motion-v ``` :: Follow this guide to setup `motion-v` on [Vue or Nuxt](https://motion.dev/docs/vue). ### Update your `main.css` file Add the following code to your `main.css` file, this setup the variable required for the components: ::code-group ```css [main.css] @import "tailwindcss"; @import "tw-animate-css"; @custom-variant dark (&:is(.dark *)); :root { --card: oklch(1 0 0); --card-foreground: oklch(0.141 0.005 285.823); --popover: oklch(1 0 0); --popover-foreground: oklch(0.141 0.005 285.823); --primary: oklch(0.21 0.006 285.885); --primary-foreground: oklch(0.985 0 0); --secondary: oklch(0.967 0.001 286.375); --secondary-foreground: oklch(0.21 0.006 285.885); --muted: oklch(0.967 0.001 286.375); --muted-foreground: oklch(0.552 0.016 285.938); --accent: oklch(0.967 0.001 286.375); --accent-foreground: oklch(0.21 0.006 285.885); --destructive: oklch(0.577 0.245 27.325); --destructive-foreground: oklch(0.577 0.245 27.325); --border: oklch(0.92 0.004 286.32); --input: oklch(0.92 0.004 286.32); --ring: oklch(0.705 0.015 286.067); --radius: 0.625rem; --background: oklch(1 0 0); --foreground: oklch(0.141 0.005 285.823); } .dark { --background: oklch(0.141 0.005 285.823); --foreground: oklch(0.985 0 0); --card: oklch(0.141 0.005 285.823); --card-foreground: oklch(0.985 0 0); --popover: oklch(0.141 0.005 285.823); --popover-foreground: oklch(0.985 0 0); --primary: oklch(0.985 0 0); --primary-foreground: oklch(0.21 0.006 285.885); --secondary: oklch(0.274 0.006 286.033); --secondary-foreground: oklch(0.985 0 0); --muted: oklch(0.274 0.006 286.033); --muted-foreground: oklch(0.705 0.015 286.067); --accent: oklch(0.274 0.006 286.033); --accent-foreground: oklch(0.985 0 0); --destructive: oklch(0.396 0.141 25.723); --destructive-foreground: oklch(0.637 0.237 25.331); --border: oklch(0.274 0.006 286.033); --input: oklch(0.274 0.006 286.033); --ring: oklch(0.442 0.017 285.786); } @theme inline { --color-background: var(--background); --color-foreground: var(--foreground); --color-card: var(--card); --color-card-foreground: var(--card-foreground); --color-popover: var(--popover); --color-popover-foreground: var(--popover-foreground); --color-primary: var(--primary); --color-primary-foreground: var(--primary-foreground); --color-secondary: var(--secondary); --color-secondary-foreground: var(--secondary-foreground); --color-muted: var(--muted); --color-muted-foreground: var(--muted-foreground); --color-accent: var(--accent); --color-accent-foreground: var(--accent-foreground); --color-destructive: var(--destructive); --color-destructive-foreground: var(--destructive-foreground); --color-border: var(--border); --color-input: var(--input); --color-ring: var(--ring); --radius-sm: calc(var(--radius) - 4px); --radius-md: calc(var(--radius) - 2px); --radius-lg: var(--radius); --radius-xl: calc(var(--radius) + 4px); } @layer base { * { @apply border-border outline-ring/50; } body { @apply bg-background text-foreground; } } html { color-scheme: light dark; } html.dark { color-scheme: dark; } html.light { color-scheme: light; } ``` :: ### Setup `cn` utility Add following utility to `lib/utils.ts` ```ts [utils.ts] import { type ClassValue, clsx } from "clsx"; import { twMerge } from "tailwind-merge"; export function cn(...inputs: ClassValue[]) { return twMerge(clsx(inputs)); } export type ObjectValues = T[keyof T]; ``` ::alert{type="success" icon="lucide:circle-check"} Great job! Your project is now configured to use Inspira UI. :: :: ### Optional: Add Icon Support A variety of Inspira UI components and demos utilize the `` component with Iconify icons. Although optional, we recommend installing it for an optimal experience. To add icon support to your Vue.js or Nuxt.js project, please follow the [Iconify Vue guide](https://iconify.design/docs/icon-components/vue/). ### Start Using Inspira UI 🚀 Now, you can start using Inspira UI components in your project. Choose the components you need, copy the code, and integrate them into your application. ::read-more{title="List of all components" to="/components"} :: URL: https://inspira-ui.com/docs/getting-started/contribution --- title: How To Contribute description: Follow the following guidelines to ensure the smooth collaboration icon: "lucide:scroll-text" --- Thank you for your interest in contributing to the **Inspira UI** project! Your contributions help make this project better for everyone. Please take a moment to read through these guidelines to ensure a smooth collaboration. ## Table of Contents 1. [Getting Started](#getting-started) 2. [Code of Conduct](#code-of-conduct) 3. [How to Contribute](#how-to-contribute) - [Reporting Bugs](#reporting-bugs) - [Suggesting Enhancements](#suggesting-enhancements) - [Adding New Components](#adding-new-components) 4. [Project Structure](#project-structure) 5. [Style Guidelines](#style-guidelines) - [Coding Standards](#coding-standards) - [Component Format](#component-format) - [Commit Messages](#commit-messages) 6. [Documentation Guidelines](#documentation-guidelines) - [Single-File Components](#single-file-components) - [Multi-File Components](#multi-file-components) 7. [Testing](#testing) 8. [License](#license) --- ## Getting Started - **Fork the Repository**: Create a personal fork of the project on GitHub. - **Clone Your Fork**: Clone your forked repository to your local machine. - **Create a Branch**: Create a new branch for your contribution (`git checkout -b feature/YourFeatureName`). - **Install Dependencies**: Run `pnpm install` to install all necessary dependencies. ## Code of Conduct By participating in this project, you agree to abide by the [Code of Conduct](./4.code-of-conduct.md), which aims to foster an open and welcoming environment. ## How to Contribute ### Reporting Bugs If you find a bug, please open an [issue](https://github.com/unovue/inspira-ui/issues){:target="\_blank"} and include: - A clear and descriptive title. - Steps to reproduce the issue. - Expected and actual results. - Screenshots or code snippets, if applicable. ### Suggesting Enhancements We welcome suggestions for new features or improvements. Please open an [issue](https://github.com/unovue/inspira-ui/issues){:target="\_blank"} and include: - A clear and descriptive title. - A detailed description of the enhancement. - Any relevant examples or mockups. ### Adding New Components We appreciate contributions that add new components to the library. Please ensure that: - The component is generally useful and aligns with the project's goals. - The component is compatible with both **Nuxt** and **Vue**. - You follow the coding and documentation guidelines outlined below. - You include unit tests for your component. #### Components guidelines 1. **Create or Update `index.ts`** Each folder under `components/content/inspira/ui//` should have an `index.ts` that exports all Vue files. For example: ```ts // index.ts export { default as Book } from "./Book.vue"; export { default as BookHeader } from "./BookHeader.vue"; export { default as BookTitle } from "./BookTitle.vue"; export { default as BookDescription } from "./BookDescription.vue"; ``` 2. **Registry Dependencies:** If your new component depends on (or uses) other Inspira UI components, you must update the `COMPONENT_DEPENDENCIES` map in `~/scripts/crawl-content.ts` to reflect those relationships. This helps the library understand which components should be installed together when a user adds them via the CLI. 3. **Nuxt-Only Features:** If your new component or its example uses Nuxt-only features such as ``, please mention this in the documentation. This ensures users know there may be limitations or additional steps when using the component outside of Nuxt. This ensures that users can install the component through the CLI and that all dependencies are properly declared. 4. **Avoid External Components:** When creating components, avoid using external UI components (like `` or similar) that are not part of the core Vue.js ecosystem. 5. **Explicit Imports:** Even if you're using Nuxt's auto-imports feature during development, always include explicit imports in your component code. This ensures compatibility with Vue.js users who don't have auto-imports. For example: ```vue ``` 6. **Icon Usage:** If you need icons in your demos or components, use the built-in `` component rather than pasting raw SVGs into your templates. ## Project Structure Understanding the project structure is crucial for effective contribution: - **Components Directory**: - Main components should be placed in `components/content/inspira/ui//`. - Include an `index.ts` file to export each component within that folder. - Example components should be placed in `components/content/inspira/examples//`. - **Documentation**: - Documentation files are located in the `content/2.components//` directory. - After adding a component, write its documentation in this directory. ## Style Guidelines ### Coding Standards - **Language**: All components should be written in **Vue.js** with TypeScript support. - **Styling**: Use **Tailwind CSS** classes for styling whenever possible. - **Naming Conventions**: Use `PascalCase` for component names and filenames. ### Component Format Your Vue components should adhere to the following structure: ```vue ``` **Props typing and code style** Refer to this Vue.js documentation page -> [https://vuejs.org/api/sfc-script-setup#type-only-props-emit-declarations](https://vuejs.org/api/sfc-script-setup#type-only-props-emit-declarations) ```vue ``` **Constants, interfaces, types and variants** For reusability purposes, you can also add an `index.ts` file at the root of the component folder to export interfaces, constants, and other useful code elements. Keep in mind that developers will copy and paste the component code into their projects, so it should be very easy to customize according to their standards. Contants have to be `CAPS_CAMEL_CASE` in order to identify them clearly inside the code. And `prefix` them. Please never use Enums; use `{} as const` instead. 😘 ```typescript // DON'T ⛔️ const Direction = { Top: 'top'} as const const ComponentNameDirection = { Top: 'top'} as const // DON'T ⛔️ enum COMPONENT_NAME_DIRECTION_WRONG = { Top = 'top'}; // DO ✅ import type { ObjectValues } from "@/lib/utils"; export const COMPONENT_NAME_DIRECTION = { Top: 'top', Bottom: 'bottom'} as const //Types and Interfaces should use CamelCase to differentiate them from constants and variables. export type ComponentNameDirection = ObjectValues; interface { direction: ComponentNameDirection; //Enforce correct value : 'top' or 'bottom' } ``` You can check the `PatternBackground` component files `components/content/inspira/ui/pattern-background` for a complete example. **Notes:** - Use ` ``` ## API | Prop Name | Type | Default | Description | | ------------- | -------- | -------- | --------------------------------------------------------- | | `text` | `string` | Required | The text to be displayed with the hover effect. | | `duration` | `number` | `200` | The duration of the mask transition animation in seconds. | | `strokeWidth` | `number` | `0.75` | The width of the text stroke. | | `opacity` | `number` | `null` | The opacity of the text. | ``` In this example, the `id` used in both `ComponentLoader`, `CodeViewer` and `InstallationCli` is `text-hover-effect`, which matches the folder name where the component and its demo are stored. ### Multi-File Components For components that consist of multiple files, such as a main component and several sub-components or variants, use the following template: 1. **Front Matter** Begin with YAML front matter: ```yaml --- title: Your Components Group Title description: A brief description of what this group of components does. --- ``` 2. **Preview Sections** Include multiple `ComponentLoader` sections for each example or variant. The `id` should be set to the folder name of your component in `components/content/inspira/examples/`. ```markdown ```vue // Component source not found for ComponentVariantDemo.vue ``` ``` 3. **Alerts** If your component has special requirements or dependencies, add an alert section before the installation instructions: ```markdown ::alert{type="info"} **Note:** This component requires `package-name` as a dependency. :: ::alert{type="warning"} **Note:** This component uses the `nuxt-only` syntax with the ``. If you are not using Nuxt, you can simply remove it. :: ``` 4. **Installation** Include both CLI and manual installation instructions. If additional setup is required (e.g., dependencies, Tailwind config updates), use a stepper to list all needed steps. ```markdown ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code in the same folder ::code-group :CodeViewerTab{label="YourComponent.vue" language="vue" componentName="YourComponent" type="ui" id="your-component-folder-name"} :CodeViewerTab{filename="YourComponent2.vue" language="vue" componentName="YourComponent2" type="ui" id="your-component-folder-name"} :: ``` 5. **API Documentation** Provide comprehensive API documentation covering all components: ```markdown ## API | Prop Name | Type | Default | Description | | --------- | -------- | ------- | --------------------------------------- | | `prop1` | `string` | `''` | Description applicable to all variants. | ``` **Example:** ```markdown --- title: Pattern Background description: Simple animated pattern background to make your sections stand out. --- Grid background with dot ```vue ``` ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code in the same folder ::code-group :CodeViewerTab{label="PatternBackground.vue" language="vue" componentName="PatternBackground" type="ui" id="pattern-background"} :CodeViewerTab{filename="index.ts" language="typescript" componentName="index" type="ui" id="pattern-background" extension="ts"} :: ## Examples Grid background with big dot and ellipse on top ```vue ``` Grid background without animation ```vue ``` Small grid background with animation ```vue ``` ## API | Prop Name | Type | Default | Description | | ----------- | ------------------------------------------------------------------------------------------------------ | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `animate` | `boolean` | `false` | Set `true` if you want to animate the background. | | `direction` | `top` \| `bottom` \| `left` \| `right` \| `top-left` \| `top-right` \| `bottom-left` \| `bottom-right` | `top` | Direction of the animation movement. You can use the const `PATTERN_BACKGROUND_DIRECTION.` | | `direction` | `grid` \| `dot` | `grid` | Type of pattern. You can use the const `PATTERN_BACKGROUND_VARIANT.` | | `size` | `xs` \| `sm` \| `md` \| `lg` | `md` | Size of the background pattern. | | `mask` | `ellipse` \| `ellipse-top` | `ellipse` | Add a mask over the background pattern. You can use the const `PATTERN_BACKGROUND_MASK.` | | `speed` | `number` | `10000` | Duration of the animation in `ms`, the bigger it is, the slower the animation. (`20000` slower than `5000`). You can use the const `PATTERN_BACKGROUND_SPEED.` | ### Custom variants, values and constants You can customize your needs directly within the `index.ts` file. See code below. ## Credits - Inspired by [Magic UI's Dot Pattern](https://magicui.design/docs/components/dot-pattern) component. - Inspired by [Magic UI's Grid Pattern](https://magicui.design/docs/components/grid-pattern) component. - Inspired by [Magic UI's Animated Grid Pattern](https://magicui.design/docs/components/animated-grid-pattern) component. - Credits to [Nathan De Pachtere](https://nathandepachtere.com/) for porting this component. ``` ## Testing - **Unit Tests**: Write unit tests for your component if applicable. - **Cross-Environment Testing**: Ensure that your component works correctly in both **Nuxt** and **Vue** environments. - **Visual Testing**: Check the component visually to ensure it renders correctly. - **CLI Installation Testing**: After updating the registry with `pnpm build:registry`, test the component installation in a separate project by referencing the local registry URL. For example: ```sh npx shadcn-vue@latest add "https://localhost:3000/r/" ``` ## Additional Notes - **Component Names**: Use `PascalCase` for component filenames and names. - **IDs**: In `CodeViewer`, `CodeViewerTab`, and `ComponentLoader`, the `id` parameter should be set to the **folder name** where the component is stored in `components/content/inspira/ui//` and `components/content/inspira/examples//`. This helps in correctly linking the code and examples in the documentation. - **Demo Components**: For each component, create a corresponding `Demo` component used in the `ComponentLoader` for previews, and place it in `components/content/inspira/examples//`. - **Localization**: If your component supports multiple languages, include details in the documentation. ## License By contributing, you agree that your contributions will be licensed under the [MIT License](https://github.com/unovue/inspira-ui/blob/main/LICENSE){:target="\_blank"}. URL: https://inspira-ui.com/docs/getting-started/code-of-conduct --- title: Code of Conduct description: Code of Conduct outlines our expectation for participant behavior as well as consequences for unacceptable conduct. icon: "lucide:award" --- ## Introduction We are committed to providing a friendly, safe, and welcoming environment for everyone involved in the **Inspira UI** project. This Code of Conduct outlines our expectations for participant behavior as well as the consequences for unacceptable conduct. ## Our Pledge In the interest of fostering an open and inclusive community, we pledge to make participation in our project and community a harassment-free experience for everyone, regardless of: - Age - Body size - Disability - Ethnicity - Gender identity and expression - Level of experience - Nationality - Personal appearance - Race - Religion - Sexual identity and orientation ## Expected Behavior All participants in our community are expected to: - **Be Respectful**: Show empathy and kindness towards others. - **Be Considerate**: Remember that your actions and words affect others. - **Be Collaborative**: Work together to achieve common goals. - **Communicate Effectively**: Use clear and constructive language. - **Demonstrate Professionalism**: Act professionally and take responsibility for your actions. ## Unacceptable Behavior The following behaviors are considered unacceptable within our community: - **Harassment and Discrimination**: Including derogatory comments, slurs, or unwanted sexual attention. - **Abuse and Threats**: Any form of verbal or written abuse, intimidation, or threats. - **Trolling and Insults**: Provocative or insulting remarks intended to disrupt conversations. - **Disrespectful Communication**: Including excessive profanity, shouting (using all caps), or interrupting others. - **Personal Attacks**: Targeting an individual with the intent to harass or belittle. ## Reporting Guidelines If you experience or witness unacceptable behavior, or have any other concerns, please report it as soon as possible by contacting the project maintainers on our **Discord channel**: [Inspira UI Discord Channel](https://discord.gg/Xbh5DwJRc9) When reporting an incident, please include: - **Your Contact Information**: Your Discord username or any preferred method of contact. - **Names of Those Involved**: Real names or usernames of the individuals involved. - **Description of the Incident**: A clear and concise account of what happened. - **Supporting Evidence**: Any relevant messages, screenshots, or context that can help us understand the situation. All reports will be handled confidentially. ## Enforcement Project maintainers are responsible for ensuring compliance with this Code of Conduct and will take appropriate action in response to any behavior that is deemed unacceptable. Actions may include: - A private warning to the offender. - Temporary or permanent ban from participation in the project and Discord channel. - Removal of contributions that violate the Code of Conduct. ## Scope This Code of Conduct applies to all project spaces, including but not limited to: - GitHub repositories - Issue trackers - Pull requests - Project-related forums and chat channels - Social media interactions pertaining to the project - The official **Inspira UI Discord channel** It also applies when an individual is representing the project or its community in public spaces. ## Appeal Process Any individual who is subjected to disciplinary action has the right to appeal the decision by contacting the project maintainers through the **Discord channel** within one week of the action. The appeal will be reviewed, and a final decision will be communicated. ## Privacy All reports of unacceptable behavior will be handled with discretion. We will respect the privacy of the reporter and the accused. ## Acknowledgments We thank all contributors and community members for helping to create a positive environment. This Code of Conduct is adapted from best practices and guidelines used in open-source communities. ## Contact Information For questions or concerns about this Code of Conduct, please contact the project maintainers on our **Discord channel**: [Inspira UI Discord Channel](https://discord.gg/Xbh5DwJRc9) URL: https://inspira-ui.com/docs/components/backgrounds/aurora-background --- title: Aurora Background description: A subtle Aurora or Southern Lights background for your website. --- ```vue ``` ## API | Prop Name | Type | Default | Description | | ---------------- | --------- | ------- | ------------------------------------------------------------------------- | | `class` | `string` | `-` | Additional CSS classes to apply to the component for styling. | | `radialGradient` | `boolean` | `true` | Determines whether a radial gradient effect is applied to the background. | ## Installation ::alert Add following entry to inline theme in your `main.css` file. ```css @theme inline { --animate-aurora: aurora 60s linear infinite; @keyframes aurora { from { background-position: 50% 50%, 50% 50%; } to { background-position: 350% 50%, 350% 50%; } } } ``` :: ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code ```vue ``` ## Features - **Slot Support**: Easily add any content inside the component using the default slot. ## Credits - Credits to [Aceternity UI](https://ui.aceternity.com/components/aurora-background). - Credits to [SivaReddy Uppathi](https://github.com/sivareddyuppathi) for porting this component. URL: https://inspira-ui.com/docs/components/backgrounds/black-hole-background --- title: Black Hole Background description: A mesmerizing, canvas-driven background effect that simulates a warped “black-hole” tunnel with animated discs, radial lines, and particles. --- ```vue ``` ## API | Prop Name | Type | Default | Description | | ------------------ | -------------------------- | --------------- | ------------------------------------------------------------- | | `strokeColor` | `string` | `"#737373"` | Stroke colour for the concentric discs and radial lines. | | `numberOfLines` | `number` | `50` | Total radial lines emanating from the centre. | | `numberOfDiscs` | `number` | `50` | Total concentric ellipses that form the tunnel. | | `particleRGBColor` | `[number, number, number]` | `[255,255,255]` | RGB colour used for the tiny particles flowing into the hole. | | `class` | `string` | `""` | Extra utility classes merged onto the root wrapper. | ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code ```vue ``` ## Features - **Dynamic Canvas Rendering** – Draws concentric discs, radiating lines, and moving particles each frame. - **Radial Gradient Layers** – Uses pseudo-elements and Motion-V to overlay colourful gradients that slowly drift. - **Clip-Path Magic** – Calculates an inner ellipse and clips lines / particles for a convincing tunnel effect. - **Performance-Aware** – Adjusts for device pixel ratio and throttles work to `requestAnimationFrame`. - **Customisable** – Tweak strokes, counts, and particle colour via props to match any theme. - **Dark-Mode Friendly** – Radial backgrounds automatically invert in dark theme. - **Responsive** – Re-computes geometry and re-renders on window resize. ## Credits - Custom generative art logic inspired by tunnel / warp animations. - Utilises **Motion-V** for gradient drift and Vue 3 Composition API for lifecycle control. - Developed with accessibility in mind—background effect remains purely decorative via `aria-hidden` canvas. URL: https://inspira-ui.com/docs/components/backgrounds/bubbles-bg --- title: Bubbles Background description: An animated background with floating bubbles. --- ```vue ``` ::alert{type="info"} **Note:** This component uses Three.js & requires `three` npm package as a dependency. :: ## Install using CLI ```vue ``` ## Install Manually ::steps{level=4} #### Install the dependencies ::code-group ```bash [npm] npm install three npm install -D @types/three ``` ```bash [pnpm] pnpm install three pnpm install -D @types/three ``` ```bash [bun] bun add three bun add -d @types/three ``` ```bash [yarn] yarn add three yarn add --dev @types/three ``` :: Copy and paste the following code ```vue ``` :: ## Example Without Blur or overlay ```vue ``` ## API | Prop Name | Type | Default | Description | | --------- | -------- | ------- | --------------------------------------------------------------- | | `blur` | `number` | `0` | Amount of blur to apply to the background, specified in pixels. | ## Features - **Animated Bubble Background**: Renders a captivating background with animated, floating bubbles using 3D graphics. - **Dynamic Color Gradients**: The bubbles and background smoothly transition between colors over time, creating a visually engaging effect. - **Customizable Blur Effect**: Use the `blur` prop to adjust the blur intensity applied over the background, enhancing depth perception. - **Slot Support**: Easily overlay content on top of the animated background using the default slot. - **Responsive Design**: The component adjusts to fit the width and height of its parent container, ensuring compatibility across different screen sizes. ## Credits - Built with the [Three.js](https://threejs.org/) library for 3D rendering and animations. - Inspired from [Tresjs Experiment](https://lab.tresjs.org/experiments/overlay). URL: https://inspira-ui.com/docs/components/backgrounds/cosmic-portal --- title: Cosmic Portal description: A breathtaking, animated 3D portal built with Three.js that features glowing rings, floating crystals, space distortion, and interdimensional streams. --- ```vue ``` ## API | Prop Name | Type | Default | Description | | ------------------ | -------- | --------- | ----------------------------------------------------------- | | `portalComplexity` | `number` | `4` | Controls the complexity of the portal effects and geometry. | | `crystalCount` | `number` | `12` | Number of floating crystals in the scene. | | `primaryColor` | `string` | `#9b59b6` | Main color for portal and background glow. | | `secondaryColor` | `string` | `#3498db` | Secondary color for blending and glow. | | `accentColor` | `string` | `#e74c3c` | Color used for portal energy and highlight. | | `vortexColor` | `string` | `#2ecc71` | Color used for swirling vortex and dimensional streams. | | `rotationSpeed` | `number` | `0.3` | Speed at which objects rotate. | | `bloomStrength` | `number` | `1.2` | Intensity of bloom postprocessing. | | `bloomRadius` | `number` | `0.7` | Radius of the bloom effect. | | `bloomThreshold` | `number` | `0.2` | Threshold for bloom visibility. | | `dimensionShift` | `number` | `4` | Level of dimension distortion for shader animation. | ## Features - **Stunning Visuals**: Animated cosmic background, glowing vortex rings, and interdimensional streams. - **Shader Driven Effects**: Unique portal burst, distortion, and pulsing animations. - **User Controls**: Zoom, rotate, and orbit around the scene using OrbitControls. - **Postprocessing**: Includes bloom and FXAA for cinematic quality. - **Dynamic Colors**: Easily shift dimensions and regenerate colors using exposed methods. - **Exposed Actions**: Call `activatePortal()` to trigger portal effects or `shiftDimensions()` to regenerate the visual style. ## Installation Ensure the following libraries are installed in your project: :pm-install{name="three postprocessing"} :pm-install{name="@types/three" save-dev} ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code ```vue ``` ## Credits - Inspired and ported from [Dimensional Portal by Techartist](https://x.com/techartist_). URL: https://inspira-ui.com/docs/components/backgrounds/falling-stars --- title: Falling Stars Background description: A stunning animated starfield background with glowing and sharp trail effects. --- ```vue ``` ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code ```vue ``` ## API | Prop Name | Type | Default | Description | | --------- | -------- | -------- | ------------------------------------------- | | `color` | `string` | `"#FFF"` | Color of the stars in the starfield. | | `count` | `number` | `200` | Number of stars displayed in the animation. | ## Features - **Dynamic Starfield**: Creates a 3D starfield effect with stars moving toward the viewer. - **Glowing and Sharp Trail Effects**: Each star has a sharp line and a blurred, glowing trail. - **Customizable**: Adjust the `color` of the stars and control the number of stars using the `count` prop. - **Responsive Design**: Automatically adapts to the size of the canvas, ensuring a full-screen starfield effect. ## Credits - Inspired by 3D starfield simulations and trail effects in modern canvas animations. - Credit to [Prodromos Pantos](https://github.com/prpanto) for porting the original component to Vue & Nuxt. URL: https://inspira-ui.com/docs/components/backgrounds/flickering-grid --- title: Flickering Grid description: A flickering grid background made with Canvas, fully customizable using Tailwind CSS. --- ```vue ``` ::alert{type="warning"} This component uses the `nuxt-only` syntax with the ``. If you are not using Nuxt, you can simply remove it. :: ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code ```vue ``` ## API | Prop Name | Type | Default | Description | | --------------- | -------- | -------------- | -------------------------------------- | | `squareSize` | `number` | `4` | Size of each square in the grid. | | `gridGap` | `number` | `6` | Gap between squares in the grid. | | `flickerChance` | `number` | `0.3` | Probability of a square flickering. | | `color` | `string` | `rgb(0, 0, 0)` | Color of the squares. | | `width` | `number` | `-` | Width of the canvas. | | `height` | `number` | `-` | Height of the canvas. | | `class` | `string` | `-` | Additional CSS classes for the canvas. | | `maxOpacity` | `number` | `0.2` | Maximum opacity of the squares. | ## Credits - Credits to [magicui flickering-grid](https://magicui.design/docs/components/flickering-grid) for this component. URL: https://inspira-ui.com/docs/components/backgrounds/interactive-grid-pattern --- title: Interactive Grid Pattern description: A interactive background grid pattern made with SVGs, fully customizable. --- ```vue ``` ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code ```vue ``` ## Examples ```vue ``` ## API #### Props | Prop Name | Type | Default | Description | | ------------------ | ------------------ | ---------- | --------------------------------------------- | | `className` | `string` | - | Additional classes for styling the component. | | `squaresClassName` | `string` | - | Additional classes for styling the squares. | | `width` | `number` | `40` | Width of the square in pixels. | | `height` | `number` | `40` | Height of the square in pixels. | | `squares` | `[number, number]` | `[24, 24]` | Number of squares in the grid pattern. | ## Credits - Inspired by [MagicUI](https://magicui.design/docs/components/interactive-grid-pattern). - Credits to [kalix127](https://github.com/kalix127) for porting this component. URL: https://inspira-ui.com/docs/components/backgrounds/lamp-effect --- title: Lamp Effect description: A captivating lamp lighting effect with conic gradients, spotlights, and glowing lines for an immersive visual experience. --- ```vue ``` ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code ```vue ``` ## API | Prop Name | Type | Default | Description | | ---------- | -------- | ------- | ---------------------------------------------- | | `delay` | `number` | `0.5` | Delay before the animation starts, in seconds. | | `duration` | `number` | `0.8` | Duration of the animation, in seconds. | | `class` | `string` | `""` | Additional CSS classes for custom styling. | ## Features - **Conic Gradient Animation**: Creates a smooth expanding conic gradient effect, giving a dynamic light-source appearance. - **Spotlight Animation**: The spotlight smoothly expands, providing a focused lighting effect. - **Glowing Line Effect**: A glowing line animates across the center, simulating a light beam or laser. - **Customizable Timing**: The `delay` and `duration` props allow for precise control of animation timings. - **Slot-Based Content**: Supports default slot content, making it easy to overlay text or other components. ## Credits - Ported from [Aceternity UI](https://ui.aceternity.com/components/lamp-effect) URL: https://inspira-ui.com/docs/components/backgrounds/liquid-background --- title: Liquid Background description: A reactive and dynamic background effect using OGL for WebGL-based visuals. --- ```vue ``` ## API This component does not require external props to function, as it dynamically renders the liquid background effect on mount. ::alert{type="info"} **Note:** This component uses OGL Web Renderer & requires `ogl` npm package as a dependency. :: ## Install using CLI ```vue ``` ## Install Manually You can copy and paste the following code to create this component: ::code-group ::CodeViewerTab{label="LiquidBackground.vue" language="vue" componentName="LiquidBackground" type="ui" id="liquid-background"} :: :: ## Features - **WebGL Rendering**: Utilizes the OGL library to provide hardware-accelerated background effects. - **Animated Shader**: Runs a custom fragment and vertex shader to generate a liquid-like visual animation. - **Automatic Resizing**: Listens to window resize events and adjusts the canvas dimensions accordingly. - **Clean Resource Management**: Disposes of the WebGL context and removes event listeners upon unmount, preventing memory leaks. ## Implementation Details 1. **OGL Renderer**: Creates a renderer with `new Renderer()` and appends the associated `canvas` to the DOM. 2. **Shader Programs**: Defines vertex (`vert`) and fragment (`frag`) shaders, where the fragment shader implements the liquid animation logic. 3. **Triangle Geometry**: Uses OGL’s built-in `Triangle` geometry for a full-screen quad. 4. **Uniforms**: - `uTime`: Updated each frame to animate the shader. - `uResolution`: Adjusted on window resize to maintain consistent visuals. - `uColor`: An example color uniform (slightly purple) used in the shader. 5. **Animation Loop**: Schedules updates via `requestAnimationFrame`, updates `uTime`, and renders the scene. ## Credits - Built with the [OGL](https://github.com/oframe/ogl) library for 3D rendering. - Inspired by generative art patterns. - Uses Vue's Composition API for lifecycle and state management. URL: https://inspira-ui.com/docs/components/backgrounds/neural-background --- title: Neural Background description: A dynamic, shader-powered animated background with fluid neural-like visuals using OGL and GLSL. navBadges: - value: New type: lime --- ```vue ``` ## API | Prop Name | Type | Default | Description | | ------------ | -------- | ------- | ------------------------------------------------------- | | `hue` | `number` | `200` | Base hue for background colors (in degrees, 0–360). | | `saturation` | `number` | `0.8` | Saturation of the background color (0–1). | | `chroma` | `number` | `0.6` | Chroma/lightness factor of the HSL color (0-1). | | `class` | `string` | `—` | Optional additional CSS classes for the canvas element. | > 💡 This component defaults to a full-screen fixed background with `pointer-events-none`. You can override styles via the `class` prop if needed. ## Install using CLI ```vue ``` ## Install Manually ```vue ``` ## Features - **GPU-accelerated animation**: Powered by [OGL](https://github.com/oframe/ogl), offering high-performance WebGL rendering. - **Neural-inspired visuals**: A recursive shader-based pattern that mimics brain-like structures and motion. - **Live pointer interaction**: Visuals react to cursor and touch movement in real time. - **Scroll-driven dynamics**: Color shift and brightness are subtly influenced by page scroll progress. - **Customizable color palette**: Modify hue, saturation, and chroma in real time with prop bindings. - **Responsive**: Auto-resizes to match viewport size and device pixel ratio. ## Notes - Uses a custom fragment shader with recursive sine accumulation to generate a complex organic background. - Performance is optimized for modern browsers and GPUs; graceful degradation is not implemented for older environments. - Intended for decorative purposes (e.g., hero sections, full-screen backgrounds). ## Credits - Built using [OGL](https://github.com/oframe/ogl) — a minimal WebGL framework. - Math and pattern logic based on recursive trigonometric layering. - Ported from [Neural Glow Cursor by Cursify](https://cursify.vercel.app/components/neural-glow). URL: https://inspira-ui.com/docs/components/backgrounds/particle-whirlpool-bg --- title: Particle Whirlpool description: An animated background with swirling particles. --- ```vue ``` ::alert{type="info"} **Note:** This component uses Three.js & requires `three` & `postprocessing` npm package as a dependency. :: ## Install using CLI ```vue ``` ## Install Manually ::steps{level=4} #### Install the dependencies ::code-group ```bash [npm] npm install three postprocessing npm install -D @types/three ``` ```bash [pnpm] pnpm install three postprocessing pnpm install -D @types/three ``` ```bash [bun] bun add three postprocessing bun add -d @types/three ``` ```bash [yarn] yarn add three postprocessing yarn add --dev @types/three ``` :: Copy and paste the following code ```vue ``` :: ## Examples Without blur and overlay ```vue ``` With `particleCount` 500 ```vue ``` ## API | Prop Name | Type | Default | Description | | --------------- | -------- | ------- | --------------------------------------------------------------- | | `class` | `string` | `""` | Additional CSS classes for custom styling. | | `blur` | `number` | `0` | Amount of blur to apply to the background, specified in pixels. | | `particleCount` | `number` | `2000` | Number of particles in the whirlpool animation. | ## Features - **Interactive Whirlpool Animation**: Renders a captivating whirlpool effect with particles that respond to mouse and touch interactions. - **Customizable Particle Count**: Adjust the `particleCount` prop to control the number of particles in the animation. - **Dynamic Blur Effect**: Use the `blur` prop to apply a blur effect over the background, enhancing the visual depth. - **Slot Support**: Overlay additional content on top of the animation using the default slot. - **Responsive Design**: The component adjusts to fit the width and height of its parent container, ensuring compatibility across different screen sizes. ## Credits - Built with the [Three.js](https://threejs.org/) library for 3D rendering and animations. - Inspired by [TroisJs](https://troisjs.github.io/examples/demos/3.html) URL: https://inspira-ui.com/docs/components/backgrounds/particles-bg --- title: Particles Background description: Particles can add a dynamic and engaging element to your website's visuals. They help create a feeling of depth, motion, and interaction, making the site more visually appealing. --- ```vue ``` ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code ```vue ``` ## API | Prop Name | Type | Default | Description | | ----------- | -------- | ------- | ----------------------------------------------------------------------------------------------------------- | | `color` | `string` | `#FFF` | Hexadecimal color code used for particles. Supports 3 or 6 character hex codes. | | `quantity` | `number` | `100` | The number of particles to generate and display on the canvas. | | `staticity` | `number` | `50` | Determines how much the particles move based on the mouse's proximity. Higher values reduce movement. | | `ease` | `number` | `50` | Controls the easing effect of particle movement; lower values make particles follow the mouse more closely. | ## Credits - Credits to [Magic UI](https://magicui.design/docs/components/particles) for this fantastic component. - Credit to [Prodromos Pantos](https://github.com/prpanto) for porting the original component to Vue & Nuxt. URL: https://inspira-ui.com/docs/components/backgrounds/pattern-background --- title: Pattern Background description: Simple animated pattern background to make your sections stand out. --- Grid background with dot ```vue ``` ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code in the same folder ::code-group :CodeViewerTab{label="PatternBackground.vue" language="vue" componentName="PatternBackground" type="ui" id="pattern-background"} :CodeViewerTab{filename="index.ts" language="typescript" componentName="index" type="ui" id="pattern-background" extension="ts"} :: ## Examples Grid background with big dot and ellipse on top ```vue ``` Grid background without animation ```vue ``` Small grid background with animation ```vue ``` ## API | Prop Name | Type | Default | Description | | ----------- | ------------------------------------------------------------------------------------------------------ | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `animate` | `boolean` | `false` | Set `true` if you want to animate the background. | | `direction` | `top` \| `bottom` \| `left` \| `right` \| `top-left` \| `top-right` \| `bottom-left` \| `bottom-right` | `top` | Direction of the animation movement. You can use the const `PATTERN_BACKGROUND_DIRECTION.` | | `direction` | `grid` \| `dot` | `grid` | Type of pattern. You can use the const `PATTERN_BACKGROUND_VARIANT.` | | `size` | `xs` \| `sm` \| `md` \| `lg` | `md` | Size of the background pattern. | | `mask` | `ellipse` \| `ellipse-top` | `ellipse` | Add a mask over the background pattern. You can use the const `PATTERN_BACKGROUND_MASK.` | | `speed` | `number` | `10000` | Duration of the animation in `ms`, the bigger it is, the slower the animation. (`20000` slower than `5000`). You can use the const `PATTERN_BACKGROUND_SPEED.` | ### Custom variants, values and constants You can customize your needs directly within the `index.ts` file. See code below. ## Credits - Inspired by [Magic UI's Dot Pattern](https://magicui.design/docs/components/dot-pattern) component. - Inspired by [Magic UI's Grid Pattern](https://magicui.design/docs/components/grid-pattern) component. - Inspired by [Magic UI's Animated Grid Pattern](https://magicui.design/docs/components/animated-grid-pattern) component. - Credits to [Nathan De Pachtere](https://nathandepachtere.com/) for porting this component. URL: https://inspira-ui.com/docs/components/backgrounds/ripple --- title: Ripple description: An animated ripple effect typically used behind elements to emphasize them. --- ```vue ``` ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code in the same folder ::code-group :CodeViewerTab{label="Ripple.vue" language="vue" componentName="Ripple" type="ui" id="ripple"} :CodeViewerTab{filename="RippleCircle.vue" language="vue" componentName="RippleCircle" type="ui" id="ripple"} :CodeViewerTab{filename="RippleContainer.vue" language="vue" componentName="RippleContainer" type="ui" id="ripple"} :: ## Examples Only lines ```vue ``` Squared ```vue ``` Blobed ```vue ``` ## API | Prop Name | Type | Default | Description | | ----------------------------- | -------- | ----------- | ---------------------------------------------------------------------- | | `baseCircleSize` | `number` | `210` | The size of the main circle in pixels. | | `baseCircleOpacity` | `number` | `0.24` | The opacity of the main circle. | | `spaceBetweenCircle` | `number` | `70` | The space between each ripple circle in pixels. | | `circleOpacityDowngradeRatio` | `number` | `0.03` | The rate at which opacity decreases for each successive ripple circle. | | `circleClass` | `string` | `undefined` | CSS class name(s) for additional styling of circles. | | `waveSpeed` | `number` | `80` | The animation speed for the wave effect, measured in ms. | | `numberOfCircles` | `number` | `7` | The number of ripple circles to render. | ## Credits - Credits to [Magic UI](https://magicui.design/docs/components/ripple). - Credits to [SivaReddy Uppathi](https://github.com/sivareddyuppathi) for porting this component. - Credits to [Nathan De Pachtere](https://nathandepachtere.com/) for updating this component. URL: https://inspira-ui.com/docs/components/backgrounds/silk-background --- title: Silk Background description: A soft, flowing shader-powered background inspired by silk fabric motion and texture, rendered using ShaderToy. navBadges: - value: New type: lime --- ```vue ``` ## API | Prop Name | Type | Default | Description | | ------------ | -------- | ------- | --------------------------------------------------------------------------- | | `hue` | `number` | `300` | Base hue for the silk texture (in degrees, 0–360). | | `saturation` | `number` | `0.5` | Saturation of the color (0–1). | | `brightness` | `number` | `1` | Brightness multiplier for the output color (0–2 recommended). | | `speed` | `number` | `1` | Controls the animation speed multiplier (e.g., `2` = double speed). | | `class` | `string` | `—` | Optional additional CSS classes for the container div (e.g., z-index, etc). | > 💡 This component uses a full-screen absolute container by default. You can override positioning or stacking via the `class` prop. ## Install using CLI ```vue ``` ## Install Manually ```vue ``` ## Features - **Shader-powered silk effect**: Based on a fragment shader that simulates soft silk motion using recursive trigonometry and noise. - **Real-time animation**: Runs on GPU with smooth transitions and natural waves. - **Interactive response**: Subtle mouse-based parallax and warping effects when the cursor is active. - **Custom color control**: Adjust hue, saturation, brightness, and animation speed using props. - **Lightweight and performant**: Optimized GLSL logic for modern GPUs and browsers. - **Modular**: Embeds the GLSL shader inside a `ShaderToy` wrapper component for easy reuse. ## Notes - Adapted from [this ShaderToy shader](https://www.shadertoy.com/view/X3yXRd) by Giorgi Azmaipharashvili (MIT License). - Designed primarily for decorative use, such as full-screen hero backgrounds or section dividers. - Shader uses a combination of sine wave functions, noise layers, and distance-based distortion. - Not recommended for low-end devices due to GPU intensity. ## Credits - Embedded in a Vue component and adapted for dynamic input via props. - Inspired by silk textures and fluid motion patterns found in organic materials. URL: https://inspira-ui.com/docs/components/backgrounds/snowfall-bg --- title: Snowfall Background description: A beautifully animated snowfall effect applied as a background. --- ```vue ``` ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code ```vue ``` ## API | Prop Name | Type | Default | Description | | ----------- | -------- | ------- | --------------------------------------------------------- | | `color` | `string` | `#FFF` | Color of the snowflakes in hexadecimal format. | | `quantity` | `number` | `100` | Number of snowflakes to display. | | `speed` | `number` | `1` | Speed at which snowflakes fall. | | `maxRadius` | `number` | `3` | Maximum radius of snowflakes. | | `minRadius` | `number` | `1` | Minimum radius of snowflakes. | | `class` | `string` | `null` | Additional CSS classes to apply to the container element. | ## Credits - Inspired by natural snowfall effects. URL: https://inspira-ui.com/docs/components/backgrounds/sparkles --- title: Sparkles description: A configurable sparkles component that can be used as a background or as a standalone component. --- ```vue ``` ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code ```vue ``` ## Examples Sparkles Full Page ```vue ``` ## API | Prop Name | Type | Default | Description | | ----------------- | -------- | ----------- | -------------------------------------------------------------------------------------- | | `background` | `string` | `'#0d47a1'` | Background color of the container. Use 'transparent' to see through to parent element. | | `particleColor` | `string` | `'#ffffff'` | Color of the particles. Accepts any valid CSS color value. | | `minSize` | `number` | `1` | Minimum size of particles in pixels. | | `maxSize` | `number` | `3` | Maximum size of particles in pixels. | | `speed` | `number` | `4` | Movement speed multiplier. Higher values create faster movement. | | `particleDensity` | `number` | `120` | Number of particles to render. Higher values create denser particle fields. | ## Credits - Credits to [M Atif](https://github.com/atif0075) for porting this component. - Ported from [Aceternity UI's Sparkles](https://ui.aceternity.com/components/sparkles). URL: https://inspira-ui.com/docs/components/backgrounds/stars-background --- title: Stars Background description: A parallax-animated starfield background using layered motion and randomized star positions. navBadges: - value: New type: lime --- ```vue ``` ## API | Prop Name | Type | Default | Description | | ------------ | --------------- | -------------------------------- | ----------------------------------------------------------------------- | | `factor` | `number` | `0.05` | Multiplier for mouse parallax movement. | | `speed` | `number` | `50` | Base speed (in seconds) for vertical looping animation of star layers. | | `transition` | `SpringOptions` | `{ stiffness: 50, damping: 20 }` | Spring physics config for smooth motion response to cursor movement. | | `starColor` | `string` | `"#fff"` | Color of the stars. Accepts any valid CSS color value. | | `class` | `string` | `—` | Optional additional classes for container div. Useful for z-index, etc. | > 💡 This component wraps a slot for children, so you can place other UI elements over the background. ## Install using CLI ```vue ``` ## Install Manually ```vue ``` ## Features - **Animated starfield**: Renders three independently scrolling layers of stars with varying sizes and density. - **Parallax effect**: Responds to mouse movement with smooth spring physics, adding depth and realism. - **Customizable star density**: Each layer uses a different number of stars for natural variation. - **Slot support**: Acts as a visual container, allowing foreground UI or content to be layered on top. - **Responsive** ## Credits - Ported from [Animate UI](https://animate-ui.com/docs/backgrounds/stars) URL: https://inspira-ui.com/docs/components/backgrounds/stractium-background --- title: Stractium Background description: A shader-based background inspired by intricate fractal patterns and organic textures, created using raymarching and GLSL. This effect is designed to simulate complex, evolving visual textures. navBadges: - value: New type: lime --- ```vue ``` ## API | Prop Name | Type | Default | Description | | ------------------ | -------- | ------- | --------------------------------------------------------------------------- | | `hue` | `number` | `0` | Base hue for the fractal texture (0–360 degrees). | | `saturation` | `number` | `1` | Saturation of the color (0–1). | | `brightness` | `number` | `1` | Brightness multiplier for the output color (0–2 recommended). | | `speed` | `number` | `1` | Speed multiplier for texture animation. | | `mouseSensitivity` | `number` | `0.5` | Controls the responsiveness of the texture to mouse movement. (0–1) | | `damping` | `number` | `1` | Damping factor to control the smoothness of texture distortions. (0–1) | | `class` | `string` | `—` | Optional additional CSS classes for the container div (e.g., z-index, etc). | > 💡 This component is designed to be used in full-screen or large section backgrounds. It is optimized for modern GPUs but may be demanding on lower-end devices. ## Install using CLI ```vue ``` ## Install Manually ```vue ``` ## Features - **Fractal and organic visual effect**: Based on raymarching, creating intricate and evolving fractal textures that simulate natural phenomena. - **Dynamic mouse interaction**: Subtle distortions and shifts in texture based on mouse movement, creating a more immersive experience. - **Color control**: Full control over hue, saturation, brightness, and animation speed to match your design’s aesthetic. - **Performance optimized**: Although complex, this shader is optimized for real-time performance in modern browsers and GPUs. - **Scalable**: Can be used as a full-screen background or in smaller sections with adjustable scale and motion properties. - **Shader-powered animation**: Real-time evolving fractal effects with smooth transitions and animations. ## Notes - Based on a ShaderToy fragment shader by the original creator of the fractal patterns (MIT License). - The shader uses raymarching techniques to create highly detailed, organic textures with subtle lighting effects and ambient occlusion. - Not recommended for low-end devices as the shader’s complexity may affect performance. - For best results, use in full-screen hero sections or large design areas. ## Credits - Embedded in a Vue component and adapted for dynamic input via props. - Inspired by fractal patterns, natural textures, and advanced raymarching techniques. URL: https://inspira-ui.com/docs/components/backgrounds/tetris --- title: Tetris description: Tetris background component, you can even click on a block to eliminate it. --- ```vue ``` ::alert{type="warning"} This component uses the `nuxt-only` syntax with the ``. If you are not using Nuxt, you can simply remove it. :: ::alert{type="info"} **Note:** This component requires `theme-colors` as a dependency. :: ## API | Prop Name | Type | Default | Description | | -------------- | -------- | ------- | ---------------------------------------------- | | `class` | `string` | `""` | Additional class names to style the component. | | `base` | `number` | `10` | How many blocks do you have in a row. | | `square-color` | `string` | `""` | Square color. | ## Install using CLI ```vue ``` ## Install Manually ::steps{level=4} #### Install the dependencies ::code-group ```bash [npm] npm install theme-colors ``` ```bash [pnpm] pnpm install theme-colors ``` ```bash [bun] bun add theme-colors ``` ```bash [yarn] yarn add theme-colors ``` :: Copy and paste the following code ```vue ``` :: ## Credits - Credits to [Whbbit1999](https://github.com/Whbbit1999) for this component. - Inspired and ported from [Nuxt UI Home](https://ui2.nuxt.com/). URL: https://inspira-ui.com/docs/components/backgrounds/video-text --- title: Video Text description: A text component with a video background. --- ```vue ``` ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code ```vue ``` ## API | Prop Name | Type | Default | Description | | ------------------ | -------------------------------- | -------------- | ------------------------------------- | | `src` | `string` | `Required` | The video source URL. | | `class` | `string` | `""` | Additional classes for the container. | | `autoPlay` | `boolean` | `true` | Whether to autoplay the video. | | `muted` | `boolean` | `true` | Whether to mute the video. | | `loop` | `boolean` | `true` | Whether to loop the video. | | `preload` | `"auto" \| "metadata" \| "none"` | `"auto"` | Whether to preload the video. | | `fontSize` | `string \| number` | `"120"` | Font size for the text mask. | | `fontWeight` | `string \| number` | `"bold"` | Font weight for the text mask. | | `textAnchor` | `string` | `"middle"` | Text anchor for the text mask. | | `dominantBaseline` | `string` | `"middle"` | Dominant baseline for the text mask. | | `fontFamily` | `string` | `"sans-serif"` | Font family for the text mask. | ## Credits - Credits to [SivaReddy Uppathi](https://github.com/sivareddyuppathi) for this component. - Ported from [Magic UI's Video Text](https://magicui.design/docs/components/video-text). URL: https://inspira-ui.com/docs/components/backgrounds/vortex --- title: Vortex Background description: A wavy, swirly, vortex background ideal for CTAs and backgrounds. --- ```vue ``` ::alert{type="info"} **Note:** This component requires `simplex-noise` as a dependency. :: ## Install using CLI ```vue ``` ## Install Manually ::steps{level=4} #### Install the dependencies ::code-group ```bash [npm] npm install simplex-noise ``` ```bash [pnpm] pnpm install simplex-noise ``` ```bash [bun] bun add simplex-noise ``` ```bash [yarn] yarn add simplex-noise ``` :: Copy and paste the following code ```vue ``` :: ## Example Full page demo usage ```vue ``` ## API | Prop Name | Type | Default | Description | | ----------------- | -------- | ----------- | ---------------------------------------------------- | | `class` | `string` | | Optional className for styling the children wrapper. | | `containerClass` | `string` | | Optional className for styling the container. | | `particleCount` | `number` | `700` | Number of particles to be generated. | | `rangeY` | `number` | `100` | Vertical range for particle movement. | | `baseHue` | `number` | `220` | Base hue for particle color. | | `baseSpeed` | `number` | `0.0` | Base speed for particle movement. | | `rangeSpeed` | `number` | `1.5` | Range of speed variation for particles. | | `baseRadius` | `number` | `1` | Base radius of particles. | | `rangeRadius` | `number` | `2` | Range of radius variation for particles. | | `backgroundColor` | `string` | `"#000000"` | Background color of the canvas. | ## Features - **Slot Support**: Easily add any content inside the component using the default slot. ## Credits - Credits to [Aceternity UI](https://ui.aceternity.com/components/vortex). - Credits to [SivaReddy Uppathi](https://github.com/sivareddyuppathi) for porting this component. URL: https://inspira-ui.com/docs/components/backgrounds/warp-background --- title: Warp Background description: A container component that applies a warp animation effect to its children --- ```vue ``` ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code in the same folder ::code-group :CodeViewerTab{label="WarpBackground.vue" language="vue" componentName="WarpBackground" type="ui" id="warp-background"} :CodeViewerTab{filename="Beam.vue" language="vue" componentName="Beam" type="ui" id="warp-background"} :: ## API | Prop Name | Type | Default | Description | | -------------- | -------- | ---------------------- | ----------------------------------------- | | `perspective` | `number` | `100` | The perspective of the warp animation | | `beamsPerSide` | `number` | `3` | The number of beams per side | | `beamSize` | `number` | `5` | The size of the beams | | `beamDelayMax` | `number` | `3` | The maximum delay of the beams in seconds | | `beamDelayMin` | `number` | `0` | The minimum delay of the beams in seconds | | `beamDuration` | `number` | `3` | The duration of the beams | | `gridColor` | `string` | `"hsl(var(--border))"` | The color of the grid lines | ## Credits - Credits to [Whbbit1999](https://github.com/Whbbit1999) for this component. - Inspired and ported from [Magic UI WarpBackground](https://magicui.design/docs/components/warp-background). URL: https://inspira-ui.com/docs/components/backgrounds/wavy-background --- title: Wavy Background description: A cool background effect with waves that move. --- ```vue ``` ::alert{type="info"} **Note:** This component requires `simplex-noise` as a dependency. :: ## Install using CLI ```vue ``` ## Install Manually ::steps{level=4} #### Install the dependencies ::code-group ```bash [npm] npm install simplex-noise ``` ```bash [pnpm] pnpm install simplex-noise ``` ```bash [bun] bun add simplex-noise ``` ```bash [yarn] yarn add simplex-noise ``` :: Copy and paste the following code ```vue ``` :: ## API | Prop Name | Type | Default | Description | | ---------------- | ------------------ | --------------------------------------------------------- | ---------------------------------------------------------- | | `class` | `string` | `-` | The content to be displayed on top of the wavy background. | | `containerClass` | `string` | `-` | The CSS class to apply to the content container. | | `colors` | `string[]` | `["#38bdf8", "#818cf8", "#c084fc", "#e879f9", "#22d3ee"]` | The colors of the waves. | | `waveWidth` | `number` | `50` | The width of the waves. | | `backgroundFill` | `string` | `"black"` | The background color. | | `blur` | `number` | `10` | The blur effect applied to the waves. | | `speed` | `"slow" \| "fast"` | `"fast"` | Range of speed variation for particles. | | `waveOpacity` | `number` | `0.5` | Base radius of particles. | | `[key: string]` | `any` | `-` | Range of radius variation for particles. | ## Features - **Slot Support**: Easily add any content inside the component using the default slot. ## Credits - Credits to [Aceternity UI](https://ui.aceternity.com/components/wavy-background). - Credits to [SivaReddy Uppathi](https://github.com/sivareddyuppathi) for porting this component. URL: https://inspira-ui.com/docs/components/buttons/gradient-button --- title: Gradient Button description: A stylish animated button with a rotating conic gradient border and customizable properties for a vibrant look. --- ```vue ``` ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code ```vue ``` ## API | Prop Name | Type | Default | Description | | -------------- | ---------- | -------------------- | ------------------------------------------------------------ | | `borderWidth` | `number` | `2` | Width of the gradient border in pixels. | | `colors` | `string[]` | Rainbow Colors Array | Array of colors used in the conic gradient border. | | `duration` | `number` | `2500` | Duration of the gradient rotation animation in milliseconds. | | `borderRadius` | `number` | `8` | Border radius for rounded corners in pixels. | | `blur` | `number` | `4` | Blur intensity of the gradient border effect in pixels. | | `class` | `string` | `""` | Additional CSS classes for custom styling. | | `bgColor` | `string` | `"#000"` | Background color of the button content. | ## Features - **Rotating Conic Gradient Border**: A dynamic, rotating conic gradient border creates a visually engaging effect. - **Customizable Color Palette**: Customize the gradient colors by providing an array of color values. - **Flexible Styling Options**: Adjust border width, border radius, and blur effect for a tailored look. - **Slot-Based Content**: Supports a default slot to easily add button content or icons. - **Smooth Animation Control**: Control the speed of the rotation using the `duration` prop. URL: https://inspira-ui.com/docs/components/buttons/interactive-hover-button --- title: Interactive Hover Button description: A visually engaging button component that responds to hover with dynamic transitions, adapting smoothly between light and dark modes for enhanced user interactivity. --- ```vue ``` ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code ```vue ``` ## API | Prop Name | Type | Default | Description | | --------- | -------- | -------- | ---------------------------------------------- | | `text` | `string` | `Button` | The text to be displayed inside the button. | | `class` | `string` | `""` | Additional class names to style the component. | ## Credits - Credits to [Whbbit1999](https://github.com/Whbbit1999) for this component. - Inspired and ported from [Magic UI Interactive Hover Button](https://magicui.design/docs/components/interactive-hover-button). URL: https://inspira-ui.com/docs/components/buttons/rainbow-button --- title: Rainbow Button description: A rainbow effect on button. --- ```vue ``` ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code ```vue ``` ## API | Prop Name | Type | Default | Description | | --------- | -------- | ---------- | ---------------------------------------------- | | `class` | `string` | `""` | Additional CSS classes to apply to the button. | | `is` | `string` | `"button"` | The HTML tag to render for the component. | | `speed` | `number` | `2` | Duration of the animation in seconds. | ## Credits - Credits to [Grzegorz Krol](https://github.com/Grzechu335) for porting this component. - Credits to [Magic UI](https://magicui.design/docs/components/rainbow-button). URL: https://inspira-ui.com/docs/components/buttons/ripple-button --- title: Ripple Button description: A stylish ripple button component with customizable colors and animation duration. --- ```vue ``` ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code ```vue ``` ## API | Prop Name | Type | Default | Description | | ------------- | -------- | ----------- | ------------------------------------------------- | | `class` | `string` | - | Additional CSS classes for custom styling. | | `rippleColor` | `string` | `"#ADD8E6"` | Color of the ripple effect. | | `duration` | `number` | `600` | Duration of the ripple animation in milliseconds. | ## Emits | Event Name | Type | Description | | ---------- | ------- | ----------- | | `click` | `event` | Click event | ## Credits - Inspired by [Magic UI's Ripple Button](https://magicui.design/docs/components/ripple-button) component. - Credits to [kalix127](https://github.com/kalix127) for porting this component. URL: https://inspira-ui.com/docs/components/buttons/shimmer-button --- title: Shimmer Button description: A button with a shimmering animated effect. --- ```vue ``` ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code ```vue ``` ## API | Prop Name | Type | Default | Description | | ----------------- | -------- | -------------------- | ------------------------------------------------------- | | `class` | `string` | `""` | Additional CSS classes to apply to the button. | | `shimmerColor` | `string` | `"#ffffff"` | Color of the shimmer effect. | | `shimmerSize` | `string` | `"0.05em"` | Size of the shimmer effect. | | `borderRadius` | `string` | `"100px"` | Border radius of the button. | | `shimmerDuration` | `string` | `"3s"` | Duration of the shimmer animation. | | `background` | `string` | `"rgba(0, 0, 0, 1)"` | Background color of the button. Can be rgb or hex code. | ## Features - **Shimmering Effect**: Displays a continuous shimmering animation on the button. - **Customizable Appearance**: Adjust shimmer color, size, duration, border radius, and background color. - **Slot Support**: Easily add any content inside the button using the default slot. - **Interactive States**: Includes hover and active states for enhanced user interaction. - **Responsive Design**: Adapts to different screen sizes and resolutions seamlessly. ## Credits - Ported from [Magic UI Shimmer Button](https://magicui.design/docs/components/shimmer-button). URL: https://inspira-ui.com/docs/components/cards/3d-card --- title: 3D Card Effect description: A card perspective effect, hover over the card to elevate card elements. --- ```vue ``` ::alert{type="warning"} This component uses the `nuxt-only` syntax with the ``. If you are not using Nuxt, you can simply remove it. :: ::alert{type="info"} If you are using `CardItem` inside a `div`, add `style="transform-style: preserve-3d;"` to the div to make `translate-z` prop to work. :: ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code in the same folder ::code-group :CodeViewerTab{filename="CardContainer.vue" language="vue" componentName="CardContainer" type="ui" id="card-3d"} :CodeViewerTab{filename="CardBody.vue" language="vue" componentName="CardBody" type="ui" id="card-3d"} :CodeViewerTab{filename="CardItem.vue" language="vue" componentName="CardItem" type="ui" id="card-3d"} ```ts [useMouseState.ts] import { ref, readonly } from "vue"; export function useMouseState() { const isMouseEntered = ref(false); function setMouseEntered(value: boolean) { isMouseEntered.value = value; } return { isMouseEntered: readonly(isMouseEntered), setMouseEntered, }; } ``` :: ## Examples With rotation ```vue ``` ## API ### `CardContainer` The `CardContainer` component serves as a wrapper for the 3D card effect. It manages mouse events to create a 3D perspective. #### Props | Prop Name | Type | Default | Description | | ---------------- | ------ | ------- | ----------------------------------------------------------- | | `class` | String | `null` | Additional classes for styling the inner container element. | | `containerClass` | String | `null` | Additional classes for styling the outer container element. | #### Usage ```vue [MyCardComponent.vue] ``` ### `CardBody` The `CardBody` component is a flexible container with preserved 3D styling. It is intended to be used within a `CardContainer` to hold content with a 3D transformation effect. #### Props | Prop Name | Type | Default | Description | | --------- | ------ | ------- | -------------------------------------- | | `class` | String | `null` | Additional classes for custom styling. | #### Usage ```vue [MyCardComponent.vue] ``` ### `CardItem` The `CardItem` component represents individual items within the 3D card. It supports various transformations (translation and rotation) to create dynamic 3D effects. #### Props | Prop Name | Type | Default | Description | | ------------ | ------------- | ------- | --------------------------------------------------------------- | | `as` | String | `"div"` | The HTML tag or component to use for the item. | | `class` | String | `null` | Additional classes for styling the item. | | `translateX` | Number/String | `0` | X-axis translation in pixels. | | `translateY` | Number/String | `0` | Y-axis translation in pixels. | | `translateZ` | Number/String | `0` | Z-axis translation in pixels, used to control the depth effect. | | `rotateX` | Number/String | `0` | X-axis rotation in degrees. | | `rotateY` | Number/String | `0` | Y-axis rotation in degrees. | | `rotateZ` | Number/String | `0` | Z-axis rotation in degrees. | #### Usage ```vue [MyCardComponent.vue] Your text or content here ``` URL: https://inspira-ui.com/docs/components/cards/apple-card-carousel --- title: Apple Card Carousel description: A sleek, Apple‑style card carousel with blur‑loading images, modal expansion, and smooth scrolling controls. --- ```vue ``` ## Overview The **Apple Carousel** suite is composed of four inter‑related components: | Component | Purpose | | ------------------- | ------------------------------------------------------------------------ | | `AppleCardCarousel` | The horizontal scroll container with left / right controls. | | `AppleCarouselItem` | A wrapper that adds enter‑animation and spacing to each card. | | `AppleCard` | A richly styled, clickable card that can expand into a fullscreen modal. | | `AppleBlurImage` | An `` replacement that starts blurred until the image loads. | Together they reproduce the interactive “App Store / Apple TV” browsing experience. --- ## `AppleCardCarousel` | Prop | Type | Default | Description | | --------------- | -------- | ------- | -------------------------------------------------- | | `initialScroll` | `number` | `0` | Horizontal scroll offset applied on mount (in px). | ### Slots The default slot should contain one or more **`AppleCarouselItem`** components. ### Emits _No custom events._ --- ## `AppleCarouselItem` | Prop | Type | Required | Description | | ------- | -------- | -------- | ------------------------------------------------------- | | `index` | `number` | ✓ | Zero‑based index; used to stagger the appear animation. | ### Slots Default slot — place an **`AppleCard`** here. --- ## `AppleCard` | Prop | Type | Required | Default | Description | | -------- | -------------------------------------------------- | -------- | ------- | ------------------------------------- | | `card` | `{ src: string; title: string; category: string }` | ✓ | — | Data object for the card. | | `index` | `number` | ✓ | — | Position within the carousel. | | `layout` | `boolean` | ✕ | `false` | Enables shared‑layout FLIP animation. | ### Slots When the card is **expanded** (modal open) the default slot renders inside the modal body; you can inject extended content such as text, images, or videos. ### Emits _No custom events (relies on injected `CarouselKey` context)._ --- ## `AppleBlurImage` | Prop | Type | Default | Description | | -------- | ------------------ | -------------------------------- | -------------------------------------------------------------- | | `src` | `string` | **—** | Image source URL. _Required._ | | `alt` | `string` | "Background of a beautiful view" | Alt text. | | `width` | `number \| string` | _img natural_ | Width attribute; omitted when using `fill`. | | `height` | `number \| string` | _img natural_ | Height attribute; omitted when using `fill`. | | `fill` | `boolean` | `false` | If `true`, sets `width:100%; height:100%` via utility classes. | | `class` | `string` | `""` | Additional classes merged via `cn()`. | When the image fires the native `load` event it gracefully transitions from `blur-sm` to no‑blur. --- ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code in the same folder ::code-group :CodeViewerTab{filename="AppleCardCarousel.vue" language="vue" componentName="AppleCardCarousel" type="ui" id="apple-card-carousel"} :CodeViewerTab{filename="AppleCarouselItem.vue" language="vue" componentName="AppleCarouselItem" type="ui" id="apple-card-carousel"} :CodeViewerTab{filename="AppleCard.vue" language="vue" componentName="AppleCard" type="ui" id="apple-card-carousel"} :CodeViewerTab{filename="AppleBlurImage.vue" language="vue" componentName="AppleBlurImage" type="ui" id="apple-card-carousel"} :CodeViewerTab{filename="AppleCarouselContext.ts" language="ts" componentName="AppleCarouselContext" type="ui" id="apple-card-carousel" extension="ts"} :: --- ## Features - **Blur‑Up Images** — Pleasant loading for card thumbnails. - **Shared Layout Animation** — Optional FLIP animation between thumbnail and modal using `layoutId`. - **Keyboard & Click Outside Close** — ⌘‑style modal dismissal (Esc key or outside click). - **Accessible Scrolling Controls** — Prev / next buttons with disabled state. - **Mobile‑Aware Scroll Calculations** — Ensures cards recentre correctly when closed on small screens. ## Credits - Ported from [Aceternity UI Apple Card Carousel](https://ui.aceternity.com/components/apple-cards-carousel). URL: https://inspira-ui.com/docs/components/cards/card-spotlight --- title: Card Spotlight description: A card component with a dynamic spotlight effect that follows the mouse cursor, enhancing visual interactivity. --- ```vue ``` ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code ```vue ``` ## API | Prop Name | Type | Default | Description | | ----------------- | -------- | ----------- | ----------------------------------------------------------- | | `gradientSize` | `number` | `200` | Radius in pixels of the spotlight effect. | | `gradientColor` | `string` | `'#262626'` | The color of the spotlight gradient. | | `gradientOpacity` | `number` | `0.8` | The opacity level of the spotlight gradient effect. | | `slotClass` | `string` | `undefined` | Class to apply to the parent container containing the slot. | ## Features - **Interactive Spotlight Effect**: Displays a dynamic spotlight that follows the user's mouse cursor, enhancing user engagement and visual appeal. - **Customizable Appearance**: Easily adjust the `gradientSize`, `gradientColor`, and `gradientOpacity` props to tailor the spotlight effect to your design preferences. - **Easy Integration**: Wrap any content within the `` component to instantly add the spotlight effect without additional configuration. - **Responsive Design**: The component adapts smoothly to different container sizes, ensuring a consistent experience across various devices and screen sizes. - **Performance Optimized**: Utilizes Vue's reactivity for efficient updates, ensuring smooth animations without compromising application performance. ## Credits - Inspired by Magic Card component from [Magic UI](https://magicui.design/docs/components/magic-card). URL: https://inspira-ui.com/docs/components/cards/direction-aware-hover --- title: Direction Aware Hover description: A direction aware hover card, that displays an image with dynamic hover effects and customizable content overlay. --- ```vue ``` ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code ```vue ``` ## API | Prop Name | Type | Default | Description | | --------------- | -------- | ----------- | ----------------------------------------------- | | `imageUrl` | `string` | Required | The URL of the image to be displayed. | | `class` | `string` | `undefined` | Additional CSS classes for the card container. | | `imageClass` | `string` | `undefined` | Additional CSS classes for the image element. | | `childrenClass` | `string` | `undefined` | Additional CSS classes for the content overlay. | ## Credits - Credits to [M Atif](https://github.com/atif0075) for porting this component. - Ported from [Aceternity UI's Direction Aware Hover](https://ui.aceternity.com/components/direction-aware-hover) URL: https://inspira-ui.com/docs/components/cards/flip-card --- title: Flip Card description: A dynamic flip card with smooth 180-degree flipping animations along both the X and Y axes, providing an engaging and interactive visual effect. --- ```vue ``` ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code ```vue ``` ## Examples ### Horizontal Flip ```vue ``` ## API | Prop Name | Type | Default | Description | | --------- | -------- | ------- | ------------------------------------------ | | `class` | `string` | `-` | The class to be applied to the component. | | `rotate` | `x \| y` | `y` | You can pass the rotate value as you want. | | Slot Name | Description | | --------- | --------------------------- | | `default` | Component to show as front. | | `back` | Component to show as back. | ## Credits - Credits to [SivaReddy Uppathi](https://github.com/sivareddyuppathi) for this component. URL: https://inspira-ui.com/docs/components/cards/glare-card --- title: Glare Card description: A glare effect that happens on hover, as seen on Linear's website. --- ```vue ``` ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code ```vue ``` ## Examples ### Multiple Cards ```vue ``` ## API | Prop Name | Type | Default | Description | | --------- | -------- | ------- | --------------------------------------------------------- | | `class` | `string` | `-` | Additional Tailwind CSS class names to apply to the card. | ## Features - **Slot Support**: Easily add any content inside the component using the default slot. ## Credits - Credits to [SivaReddy Uppathi](https://github.com/sivareddyuppathi) for this component. - Inspired from [Aceternity UI](https://ui.aceternity.com/components/glare-card). URL: https://inspira-ui.com/docs/components/cursors/fluid-cursor --- title: Fluid Cursor description: A GPU-accelerated animated cursor trail that simulates fluid motion. --- ```vue ``` ## API | Prop Name | Type | Default | Description | | --------------------- | --------- | ------------------------ | ---------------------------------------------------------------------------------- | | `simResolution` | `number` | `128` | Resolution for the simulation grid affecting fluid detail and performance. | | `dyeResolution` | `number` | `1440` | Resolution for the fluid dye (color) texture. | | `captureResolution` | `number` | `512` | Resolution for capturing input events. | | `densityDissipation` | `number` | `3.5` | Rate at which color density dissipates over time. | | `velocityDissipation` | `number` | `2` | Rate at which velocity dissipates over time, affecting fluid momentum persistence. | | `pressure` | `number` | `0.1` | Pressure factor used in fluid physics calculations. | | `pressureIterations` | `number` | `20` | Number of iterations for pressure solver accuracy. | | `curl` | `number` | `3` | Intensity of curl/vorticity effect to enhance swirling motions. | | `splatRadius` | `number` | `0.2` | Radius of the pointer's splat effect in the fluid. | | `splatForce` | `number` | `6000` | Force applied by the pointer to the fluid on interaction. | | `shading` | `boolean` | `true` | Enable or disable shading effects for depth and light on fluid colors. | | `colorUpdateSpeed` | `number` | `10` | Speed at which pointer colors update dynamically. | | `backColor` | `object` | `{ r: 0.5, g: 0, b: 0 }` | Background color of the fluid in RGB format. | | `transparent` | `boolean` | `true` | Whether the canvas background is transparent. | | `class` | `string` | `undefined` | Additional CSS classes for the outer container div. | ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code: ```vue ``` ## Features - **GPU-powered fluid simulation**: Smooth and performant fluid dynamics using WebGL shaders. - **Pointer interaction**: Fluid responds dynamically to mouse and touch input with colorful splats. - **Customizable physics**: Adjustable simulation resolution, pressure, curl, and dissipation parameters. - **Shading effects**: Optional lighting/shading for enhanced 3D fluid appearance. - **Responsive canvas**: Automatically resizes and adapts to device pixel ratio for crisp visuals. - **Background control**: Support for transparent or solid colored backgrounds. ## Credits - Inspired from [Fluid Cursor by Cursify](https://cursify.vercel.app/components/fluid-cursor) - Utilizes WebGL 1/2 context and custom GLSL shaders for fluid physics and rendering. URL: https://inspira-ui.com/docs/components/cursors/image-trail-cursor --- title: Image Trail Cursor description: An interactive cursor effect that creates a dynamic trail of images following mouse movement with multiple animation variants. navBadges: - value: New type: lime --- ```vue ``` ## API | Prop Name | Type | Default | Description | | --------- | ------------- | --------- | ------------------------------------------------------ | | `images` | `string[]` | `[]` | Array of image URLs to display in the trailing effect. | | `variant` | `VariantType` | `"type1"` | Animation variant type (`"type1"` through `"type7"`). | > 💡 This component creates a full-width, full-height container with high z-index for cursor tracking. Each image is 190px wide with a 1.1 aspect ratio and rounded corners. ## Install using CLI ```vue ``` ## Install Manually ::code-group ::CodeViewerTab{label="ImageTrailCursor.vue" language="vue" componentName="ImageTrailCursor" type="ui" id="image-trail-cursor"} :: ::CodeViewerTab{label="trail-variants.ts" language="typescript" componentName="trail-variants" language="ts" type="ui" id="image-trail-cursor" extension="ts"} :: :: ## Features - **Multiple animation variants**: Choose from 7 different trail animation patterns and behaviors. - **Dynamic image rendering**: Displays provided images with smooth opacity transitions and transforms. - **Responsive design**: Images scale appropriately with rounded corners and overflow handling. - **Memory management**: Automatically destroys and recreates instances when variant changes. - **Performance optimized**: Uses `will-change` CSS property for smooth GPU-accelerated animations. - **Flexible image support**: Accepts any array of image URLs for customizable visual content. ## Notes - The component uses a variant system with different animation classes mapped in `trail-variants.ts`. - Images are positioned absolutely with a slight overflow effect (20px larger with -10px offset) for smoother visual transitions. - The container maintains a high z-index (100) to ensure the trail effect appears above other content. - Variant instances are properly cleaned up on component unmount and variant changes to prevent memory leaks. ## Credits - Inspired by modern cursor trail effects and image hover interactions. - Built with Vue 3 Composition API for optimal reactivity and performance. - Ported from [Codrops Article](https://tympanus.net/codrops/2023/10/18/ideas-for-image-motion-trail-animations/) URL: https://inspira-ui.com/docs/components/cursors/sleek-line-cursor --- title: Sleek Line Cursor description: A reactive animated cursor trail with smooth wave-like motion, using spring physics and dynamic color waves. navBadges: - value: New type: lime --- ```vue ``` ## API | Prop Name | Type | Default | Description | | ----------- | -------------------- | ----------- | ------------------------------------------------------------------------- | | `class` | `string \| string[]` | `undefined` | Additional CSS classes for the canvas container element. | | `trails` | `number` | `20` | Number of trailing lines rendered behind the cursor. | | `size` | `number` | `50` | Number of spring-connected nodes per trail. | | `friction` | `number` | `0.5` | Global friction applied to velocity. | | `dampening` | `number` | `0.25` | Velocity damping applied between connected nodes. | | `tension` | `number` | `0.98` | Reduces spring intensity across the tail, giving a fluid tapering motion. | > 💡 This component uses `pointer-events-none` and is fixed fullscreen by default. You can extend or override its styling via the `class` prop. ## Install using CLI ```vue ``` ## Install Manually ```vue ``` ## Features - **Spring-based animation**: Trails follow the cursor using simulated spring physics and velocity propagation. - **Color wave dynamics**: Dynamic hue changes via sinusoidal wave functions, generating smooth color transitions. - **Touch support**: Works seamlessly with both mouse and touch inputs. - **Lightweight and performant**: Uses the native `` API with no external dependencies. - **Auto-resizing canvas**: Resizes dynamically with window or orientation changes. - **Custom styling**: Easily styled using Tailwind or your own classes. ## Credits - Ported from [Canvas Cursor by Cursify](https://cursify.vercel.app/components/canvas-cursor). URL: https://inspira-ui.com/docs/components/cursors/smooth-cursor --- title: Smooth Cursor description: A customizable, physics-based smooth cursor animation component for Vue applications. --- ```vue ``` ::alert{type="warning"} This component uses the `nuxt-only` syntax with the ``. If you are not using Nuxt, you can simply remove it. :: ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code ::code-group ::CodeViewer{filename="SmoothCursor.vue" language="vue" componentName="SmoothCursor" type="ui" id="smooth-cursor"} :: ```vue ``` :: ## API | Prop Name | Type | Default | Description | | -------------- | -------------- | --------------- | ------------------------------------------------------- | | `cursor` | `Component` | `DefaultCursor` | Custom cursor component to replace the default cursor | | `springConfig` | `SpringConfig` | `See below` | Configuration object for the spring animation behavior. | ### SpringConfig Type ```ts interface springConfig { damping: number; stiffness: number; mass: number; restDelta: number; } ``` ### Default SpringConfig Configuration ```ts const defaultSpringConfig = { damping: 45, stiffness: 400, mass: 1, restDelta: 0.001, }; ``` ## Browser Support Compatible with all modern browsers that support: - `requestAnimationFrame` - CSS transforms - Pointer events ## Accessibility When using this component, consider that: - Users navigating via keyboard will not see the custom cursor - You may want to provide alternative visual cues for interactive elements - Some users may have motion sensitivity, so consider providing a way to disable the animation ## Features - 🎯 Smooth physics-based cursor animations - 🔄 Rotation effects based on movement direction - ⚡ Performance optimized with RAF - 🎨 Fully customizable cursor design - 📦 Lightweight and easy to implement ## Credits - Credits to [Whbbit1999](https://github.com/Whbbit1999) for this component. - Ported from [Magic UI Smooth Cursor](https://magicui.design/docs/components/smooth-cursor). URL: https://inspira-ui.com/docs/components/cursors/tailed-cursor --- title: Tailed Cursor description: A smooth, colorful ribbon cursor trail rendered with WebGL using OGL, featuring dynamic shaders and customizable animation effects. --- ```vue ``` ## API | Prop Name | Type | Default | Description | | -------------------- | ---------- | ---------------------------------------------- | ------------------------------------------------------------ | | `colors` | `string[]` | `["#ff9346", "#7cff67", "#ffee51", "#00d8ff"]` | Array of colors for each tail ribbon. | | `baseSpring` | `number` | `0.03` | Spring strength for tail movement responsiveness. | | `baseFriction` | `number` | `0.9` | Friction factor slowing down the tail movement. | | `baseThickness` | `number` | `30` | Base thickness of the tail ribbons. | | `offsetFactor` | `number` | `0.05` | Horizontal offset factor between each ribbon line. | | `maxAge` | `number` | `500` | Maximum age for tail segments controlling their fade timing. | | `pointCount` | `number` | `50` | Number of points composing each ribbon tail. | | `speedMultiplier` | `number` | `0.6` | Speed multiplier controlling the animation speed. | | `enableFade` | `boolean` | `false` | Enables fading effect on tail edges. | | `enableShaderEffect` | `boolean` | `false` | Enables dynamic shader wave effect on ribbons. | | `effectAmplitude` | `number` | `2` | Amplitude of the shader wave effect when enabled. | | `backgroundColor` | `number[]` | `[0, 0, 0, 0]` | RGBA background clear color for the WebGL canvas. | ## Installation This component requires the **OGL** library for WebGL rendering. ::pm-install{name="ogl"} :: ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code: ```vue ``` ## Features - **WebGL-powered tails**: High-performance smooth trailing ribbons following the cursor. - **Multi-color ribbons**: Multiple colored tails with customizable colors and offsets. - **Dynamic shaders**: Optional shader-based waving effects and fade transitions. - **Responsive and adaptive**: Automatically resizes with container and supports touch input. - **Customizable physics**: Adjustable spring, friction, thickness, and speed for fine-tuned motion. - **Lightweight integration**: Minimal external dependencies, easy to integrate in Vue 3 apps. ## Credits - Built with [OGL](https://github.com/oframe/ogl), a lightweight WebGL framework. - Inspired from [Codrops Article](https://tympanus.net/codrops/2019/09/24/crafting-stylised-mouse-trails-with-ogl/) URL: https://inspira-ui.com/docs/components/device-mocks/iphone-mockup --- title: iPhone Mockup description: An SVG mockup of an iPhone. --- ```vue ``` ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code ```vue ``` ## API | Prop Name | Type | Default | Description | | --------- | -------- | ------- | ---------------------------------------------- | | `width` | `number` | `433` | Width of the mockup SVG in pixels. | | `height` | `number` | `882` | Height of the mockup SVG in pixels. | | `src` | `string` | `null` | URL of the image to display inside the mockup. | ## Features - **Realistic iPhone 15 Pro Mockup**: Provides an accurate SVG representation of the iPhone 15 Pro, perfect for showcasing mobile app designs or website previews. - **Customizable Dimensions**: Adjust the `width` and `height` props to fit your specific design requirements. - **Image Display Support**: Use the `src` prop to insert any image into the mockup screen area, allowing for dynamic content display. - **Light and Dark Mode Compatibility**: The mockup adapts its colors based on the theme, ensuring consistency in both light and dark modes. - **Easy Integration**: Simple to include in your Vue projects with minimal setup. ## Credits - Ported from [Magic UI](https://magicui.design/docs/components/iphone-15-pro). URL: https://inspira-ui.com/docs/components/device-mocks/safari-mockup --- title: Safari Mockup description: An SVG mockup of the Safari browser. --- ```vue ``` ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code ```vue ``` ## API | Prop Name | Type | Default | Description | | --------- | -------- | ------- | ---------------------------------------------- | | `url` | `string` | `null` | URL displayed in the mockup's address bar. | | `src` | `string` | `null` | URL of the image to display inside the mockup. | | `width` | `number` | `1203` | Width of the mockup SVG in pixels. | | `height` | `number` | `753` | Height of the mockup SVG in pixels. | ## Features - **Realistic Safari Browser Mockup**: Provides an SVG representation of the Safari browser window, ideal for showcasing website designs. - **Customizable Dimensions**: Adjust the `width` and `height` props to fit your specific needs. - **Address Bar URL Display**: Use the `url` prop to display a custom URL in the mockup's address bar. - **Image Display Support**: Use the `src` prop to insert any image into the mockup's content area. - **Light and Dark Mode Compatibility**: The mockup adapts its colors based on the theme. ## Credits - Ported from [Magic UI](https://magicui.design/docs/components/safari). URL: https://inspira-ui.com/docs/components/index --- title: Component Index description: List of all the components provided by Inspira UI. navigation: false --- ::NewComponentsMarquee :: ## All components ::ComponentIndex :: URL: https://inspira-ui.com/docs/components/input-and-forms/color-picker --- title: Color Picker description: A comprehensive color picker component with support for multiple color formats, accessibility features, and custom swatches. --- ```vue ``` ::alert{type="info"} **Note:** This component uses `@uiw/color-convert` npm package for color conversions. :: ## Install using CLI ```vue ``` ## Install Manually ::steps{level=4} #### Install the dependencies ::code-group ```bash [npm] npm install @uiw/color-convert ``` ```bash [pnpm] pnpm install @uiw/color-convert ``` ```bash [bun] bun add @uiw/color-convert ``` ```bash [yarn] yarn add @uiw/color-convert ``` :: Copy and paste the following code ::code-group :CodeViewerTab{filename="ColorPicker.vue" language="vue" componentName="ColorPicker" type="ui" id="color-picker"} :CodeViewerTab{filename="ObjectColorInput.vue" language="vue" componentName="ObjectColorInput" type="ui" id="color-picker"} :CodeViewerTab{filename="ContrastRatio.vue" language="vue" componentName="ContrastRatio" type="ui" id="color-picker"} :CodeViewerTab{filename="index.ts" language="ts" componentName="index" extension="ts" type="ui" id="color-picker"} :: :: ## API ### ColorPicker Props | Prop Name | Type | Default | Description | | --------------------- | ----------------------------------------------- | ----------- | ------------------------------------------------- | | `value` | `string \| HsvaColor \| HslaColor \| RgbaColor` | `undefined` | The current color value in any supported format | | `type` | `'hsl' \| 'hsla' \| 'rgb' \| 'rgba' \| 'hex'` | `'hsl'` | Default color format to display in inputs | | `swatches` | `HexColor[]` | `[]` | Array of predefined color swatches | | `hideContrastRatio` | `boolean` | `false` | Hide the accessibility contrast ratio section | | `hideDefaultSwatches` | `boolean` | `false` | Hide the default color swatches | | `class` | `string` | `""` | Additional CSS classes for the popover content | | `open` | `boolean` | `false` | Control the open/closed state of the color picker | ### ColorPicker Events | Event Name | Type | Description | | -------------- | ----------------------------------- | ------------------------------------------- | | `value-change` | `(value: ColorPickerValue) => void` | Emitted when the selected color changes | | `update:open` | `(value: boolean) => void` | Emitted when the popover open state changes | ### ColorPickerValue Type ```typescript interface ColorPickerValue { hex: string; // Hex color string (e.g., "#ff0000") hsl: HslaColor; // HSL color object with h, s, l, a properties hsla: HslaColor; // HSLA color object with h, s, l, a properties rgb: RgbaColor; // RGB color object with r, g, b, a properties rgba: RgbaColor; // RGBA color object with r, g, b, a properties } ``` ## Features - Multiple color formats (HEX, HSL, HSLA, RGB, RGBA with alpha channel) - Interactive saturation, hue, and alpha sliders - Alpha channel support with transparency slider for RGBA/HSLA modes - Custom color swatches with default predefined colors - Accessibility contrast checker with AA/AAA indicators ## Credits - Credits to [kalix127](https://github.com/kalix127) for porting this component. - Inspired by [@uplusion23](https://21st.dev/uplusion23/color-picker/color-picker-with-swatches-and-onchange). URL: https://inspira-ui.com/docs/components/input-and-forms/file-upload --- title: File Upload description: A modern file upload component with a 3D card effect, drag-and-drop functionality, and a responsive grid background pattern. --- ```vue ``` ::alert{type="warning"} This component uses the `nuxt-only` syntax with the ``. If you are not using Nuxt, you can simply remove it. :: ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code in the same folder ::code-group :CodeViewerTab{label="FileUpload.vue" language="vue" componentName="FileUpload" type="ui" id="file-upload"} :CodeViewerTab{label="FileUploadGrid.vue" language="vue" componentName="FileUploadGrid" type="ui" id="file-upload"} :: ## API ### `FileUpload` The `FileUpload` component serves as a wrapper for the file upload effect. It manages mouse events to create a 3D perspective. #### Props | Prop Name | Type | Default | Description | | --------- | ------ | ------- | ----------------------------------------------------- | | `class` | String | - | Additional classes for styling the container element. | #### Emits | Event Name | Type | Description | | ---------- | ------------------------- | ---------------------------------------------------------- | | `onChange` | `(files: File[]) => void` | Callback function triggered when files are added/uploaded. | #### Usage ```vue [MyComponent.vue] ``` ### `FileUploadGrid` The `FileUploadGrid` component provides the background grid pattern for the file upload area. It is intended to be used within a `FileUpload` component to create the visual grid effect behind the upload interface. #### Props | Prop Name | Type | Default | Description | | --------- | ------ | ------- | -------------------------------------- | | `class` | String | - | Additional classes for custom styling. | #### Usage ```vue [MyComponent.vue] ``` ## Credits - Credits to [kalix127](https://github.com/kalix127) for porting this component. - Inspired by [AcernityUI](https://ui.aceternity.com/components/file-upload). URL: https://inspira-ui.com/docs/components/input-and-forms/halo-search --- title: Halo Search description: A futuristic search input component featuring multiple glowing rings and subtle animated halos for a vibrant, immersive UI experience. --- ```vue ``` ## API | Prop Name | Type | Default | Description | | --------- | -------- | ------- | ------------------------------------------ | | `class` | `string` | `""` | Additional CSS classes for root container. | ## Installation No external dependencies required besides Vue 3 and your icon system for the search icon. ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code ```vue ``` ## Features - **Glowing rings**: Multiple layered conic-gradient rings with smooth rotation animations. - **Aurora glow**: Large blurred gradient background creating an ambient halo effect. - **Inner and outer glows**: Subtle blurred overlays enhancing depth and focus. - **Animated search button**: Gradient ring with infinite rotation accent on search icon. - **Responsive input**: Clean, dark-themed search input with custom placeholder styling. - **Interactive states**: Hover and focus animations rotate rings and adjust glow intensities for dynamic feedback. - **Scoped styles**: Encapsulated CSS ensuring style isolation and smooth transitions. ## Usage Ideas - Use as a stylish search bar in dashboards, music or video apps, and creative portfolios. - Integrate into landing pages to create a memorable first impression with subtle animations. - Combine with dark or dim-themed UI layouts to amplify the glowing halo effects. - Customize glow colors and animation timings in CSS to match brand themes or seasonal campaigns. - Extend with keyboard navigation or search autocomplete for enhanced accessibility. ## Credits - Design inspired by futuristic UI concepts and ambient lighting effects popular in modern web and app design. - Inspired from UiVerse Search input challenge. URL: https://inspira-ui.com/docs/components/input-and-forms/input --- title: Input description: A versatile and visually dynamic input field with radial hover effects, styled for modern web applications. --- ```vue ``` ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code ```vue ``` ## API | Prop Name | Type | Default | Description | | ---------------- | ------------------- | ------- | ----------------------------------------------------------- | | `defaultValue` | `string \| number` | `""` | Default value of the input field. | | `class` | `string` | `""` | Additional CSS classes for custom styling. | | `containerClass` | `string` | `""` | Additional CSS classes for custom styling of the container. | ## Features - **Radial Hover Effect**: Displays a dynamic radial gradient background that follows mouse movements when hovering over the input container. - **Two-Way Binding**: Supports `v-model` for seamless integration with Vue's two-way data binding. - **Dark Mode Compatibility**: Automatically adapts to dark mode styles using Tailwind's `dark:` utilities. - **Customizable Styles**: Easily extend or override styles using the `class` prop. - **Accessible Focus Ring**: Includes focus-visible styles for enhanced accessibility and usability. - **Responsive Design**: Works well across different screen sizes and devices. ## Styles This component inherits base styles from ShadCN Vue’s Input component and applies additional functionality, including hover effects and shadow styling. ## Credits - Built on ShadCN Vue's Input component foundation, with extended functionality for modern UI/UX needs. - Ported from [Aceternity UI's Signup Form Input Component](https://ui.aceternity.com/components/signup-form) URL: https://inspira-ui.com/docs/components/input-and-forms/placeholders-and-vanish-input --- title: Placeholders And Vanish Input description: Sliding in placeholders and vanish effect of input on submit --- ```vue ``` ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code ```vue ``` ## API | Prop Name | Type | Default | Description | | -------------- | --------------- | ----------------------------------------------------- | ------------------------------------------------------------------------------- | | `placeholders` | `Array` | `["Placeholder 1", "Placeholder 2", "Placeholder 3"]` | An array of placeholder texts that cycle through as prompts in the input field. | This component listens to the following events emitted by the `VanishingInput` component: | Event Name | Parameters | Description | | ---------- | ---------- | --------------------------------------- | | `change` | `Event` | Triggered when the input value changes. | | `submit` | `string` | Triggered when the input is submitted. | ## Credits - Credits to [M Atif](https://github.com/atif0075) for porting this component. - Ported from [Aceternity UI's Placeholders And Vanish Input](https://ui.aceternity.com/components/placeholders-and-vanish-input). URL: https://inspira-ui.com/docs/components/miscellaneous/animate-grid --- title: Animate Grid description: Skew Animation grid with box shadow. --- ```vue ``` ## Install using CLI ```vue ``` ## Install Manually ::steps{level=4} Copy and paste the following code ::CodeViewer{filename="AnimateGrid.vue" language="vue" componentName="AnimateGrid" type="ui" id="animate-grid"} :: #### Add SVG file Add at least one SVG file to the same folder as your component and update the import in your component to use it :: ## API | Prop Name | Type | Default | Description | | -------------------- | -------- | ------------------- | --------------------------------------------------- | | `textGlowStartColor` | `string` | `"#38ef7d80"` | Color of the box shadow start. | | `textGlowEndColor` | `string` | `"#38ef7d"` | Color of the box shadow end. | | `perspective` | `number` | `600` | You can pass perspective to transform CSS property. | | `rotateX` | `number` | `-1` | You can pass rotateX to transform CSS property. | | `rotateY` | `number` | `-15` | You can pass rotateY to transform CSS property. | | `cards` | `[]` | `"[{logo: 'src'}]"` | Cards to display in grid. | | `class` | `string` | `""` | Additional tailwind CSS classes for custom styling. | ## Features - **Slot-Based Content**: Supports a default slot to add content inside the Animate Grid container. ## Credits - Thanks to [SivaReddy Uppathi](https://github.com/sivareddyuppathi) for providing this component. URL: https://inspira-ui.com/docs/components/miscellaneous/animated-circular-progressbar --- title: Animated Circular Progress Bar description: Animated Circular Progress Bar is a component that displays a circular gauge with a percentage value. --- ```vue ``` ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code ```vue ``` ## API | Prop Name | Type | Default | Description | | --------------------- | --------- | -------------------- | ------------------------------------------- | | `class` | `string` | `-` | The class to be applied to the component. | | `max` | `number` | `100` | The maximum value of the gauge. | | `min` | `number` | `0` | The minimum value of the gauge. | | `value` | `number` | `0` | The current value of the gauge. | | `gaugePrimaryColor` | `string` | `rgb(79 70 229)` | The primary color of the gauge. | | `gaugeSecondaryColor` | `string` | `rgba(0, 0, 0, 0.1)` | The secondary color of the gauge. | | `circleStrokeWidth` | `number` | `10` | The width of the circle progress bar. | | `showPercentage` | `boolean` | `true` | Show the value inside the circle | | `duration` | `number` | `1` | The duration of the animation (in seconds). | ## Credits - Credits to [Magic UI](https://magicui.design/docs/components/animated-circular-progress-bar). - Credits to [SivaReddy Uppathi](https://github.com/sivareddyuppathi) for porting this component. URL: https://inspira-ui.com/docs/components/miscellaneous/animated-list --- title: Animated List description: A sequentially animated list that introduces each item with a timed delay, perfect for displaying notifications or events on your landing page. --- ```vue ``` ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code in the same folder ::code-group :CodeViewerTab{label="AnimatedList.vue" language="vue" componentName="AnimatedList" type="ui" id="animated-list"} :CodeViewerTab{label="Notification.vue" language="vue" componentName="Notification" type="ui" id="animated-list"} :: ## API | Prop Name | Type | Default | Description | | --------- | -------- | ------- | -------------------------------------------------------------- | | `delay` | `number` | `1` | The delay in milliseconds before adding each item to the list. | ## Features - **Animated Item Loading**: Items are added to the list one by one with a configurable delay. - **Smooth Transitions**: Each item animates in with a spring effect on entry and a smooth scale and opacity animation on exit. - **Reverse Order**: Items are displayed in reverse order (newest at the top) for a dynamic, engaging user experience. - **Flexibility**: You can pass different components as items, making it highly versatile. ## Credits - Inspired by [Magic UI](https://magicui.design/docs/components/animated-list). URL: https://inspira-ui.com/docs/components/miscellaneous/animated-testimonials --- title: Animated Testimonials description: An engaging and animated testimonial component showcasing user feedback with transitions and auto-play functionality. --- ```vue ``` ## API | Prop Name | Type | Default | Description | | -------------- | --------------- | ------- | ---------------------------------------------------------------------------------------------- | | `testimonials` | `Testimonial[]` | `[]` | An array of testimonial objects containing quote, name, image, and designation. | | `autoplay` | `boolean` | `false` | Whether to cycle through testimonials automatically. | | `duration` | `number` | `5000` | Duration (in milliseconds) to wait before automatically transitioning to the next testimonial. | ### Testimonial Object Each testimonial object must contain the following fields: | Property | Type | Description | | ------------- | -------- | ----------------------------------------------------------------- | | `quote` | `string` | The testimonial text. | | `name` | `string` | The name of the person or entity providing the testimonial. | | `designation` | `string` | The position or role of the testimonial author (e.g., CEO, user). | | `image` | `string` | URL of the image or avatar for the testimonial author. | ## Install using CLI ```vue ``` ## Install Manually You can copy and paste the following code to create this component: ```vue ``` ## Features - **Animated Slides**: Utilizes Motion-V to animate transitions between testimonials. - **Auto-Play Support**: Automatically transitions to the next testimonial after a specified duration. - **Random Rotation Effects**: Adds a subtle randomized rotation for each new slide. - **Navigation Buttons**: Manually cycle through testimonials using previous and next controls. - **Responsive and Modular**: Adapts well to different screen sizes, allowing easy integration into various layouts. ## Credits - Ported from (Aceternity UI Animated Testimonials)[https://ui.aceternity.com/components/animated-testimonials]. URL: https://inspira-ui.com/docs/components/miscellaneous/animated-tooltip --- title: Animated Tooltip description: A cool tooltip that reveals on hover, follows mouse pointer --- ```vue ``` ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code ```vue ``` ## API | Prop Name | Type | Default | Description | | --------- | ----------------------------------------------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------- | | `items` | `Array<{id: number, name: string, designation: string, image: string}>` | `[]` | An array of objects, each representing an item. Each object in the array should have the following properties: id, name, designation, image | ## Credits - Credits to [M Atif](https://github.com/atif0075) for this component. - Inspired from [Aceternity UI's Animated Tooltip](https://ui.aceternity.com/components/animated-tooltip). URL: https://inspira-ui.com/docs/components/miscellaneous/balance-slider --- title: Balance Slider description: A dynamic balance slider with adjustable colors, limits, and interactive tooltip. --- ```vue ``` ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code ```vue ``` ## API | Prop Name | Type | Default | Description | | ---------------- | -------- | ----------- | --------------------------------------------------- | | `initialValue` | `number` | `50` | Initial position of the slider (0-100). | | `leftColor` | `string` | `"#e68a00"` | Background color for the left side of the slider. | | `rightColor` | `string` | `"#ffffff"` | Background color for the right side of the slider. | | `minShiftLimit` | `number` | `40` | Minimum limit where shifting animation activates. | | `maxShiftLimit` | `number` | `68` | Maximum limit where shifting animation deactivates. | | `leftContent` | `string` | `"LEFT"` | Text displayed in the tooltip for the left side. | | `rightContent` | `string` | `"RIGHT"` | Text displayed in the tooltip for the right side. | | `indicatorColor` | `string` | `"#FFFFFF"` | Color of the central indicator on the slider. | ## Features - **Dual-Sided Color Control**: Customize the left and right side colors of the slider to create a distinct balance effect. - **Interactive Tooltip**: Displays real-time percentage values for both sides, with customizable content for left and right labels. - **Shift Animation**: Activates a shifting effect within defined limits, adding an engaging visual element. - **Responsive Indicator**: Central indicator adjusts its color based on active state, enhancing interactivity. - **Accessible Controls**: Works with keyboard and touch interactions for seamless accessibility. ## Credits - Inspired and ported from code shared in [Jhey's CSS only version of Balance Slider](https://x.com/jh3yy/status/1748809599598399792?s=46) - Original concept by [Malay Vasa](https://x.com/MalayVasa/status/1748726374079381930). URL: https://inspira-ui.com/docs/components/miscellaneous/bento-grid --- title: Bento Grid description: A cool grid layout with different child component. --- ```vue ``` ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code in the same folder ::code-group :CodeViewerTab{label="BentoGrid.vue" language="vue" componentName="BentoGrid" type="ui" id="bento-grid"} :CodeViewerTab{label="BentoGridCard.vue" language="vue" componentName="BentoGridCard" type="ui" id="bento-grid"} :CodeViewerTab{label="BentoGridItem.vue" language="vue" componentName="BentoGridItem" type="ui" id="bento-grid"} :: ## Examples `BentoGrid` in MagicUI style. ```vue ``` ## API #### `BentoGridItem` | Slot Name | Description | | ------------- | --------------------------------- | | `title` | Component to show as title. | | `description` | Component to show as description. | | `icon` | Component to show as icon. | | `header` | Component to show as header. | #### `BentoGridCard` | Slot Name | Description | | ------------ | -------------------------------- | | `background` | Component to show in background. | | Props Name | Type | Description | | ------------- | --------- | ------------------------------------ | | `name` | `string` | Name or title to show on card. | | `icon` | `?string` | Icon component to show on card. | | `description` | `string` | Description content to show on card. | | `href` | `string` | Link to the url for CTA. | | `cta` | `string` | Text to show on CTA. | ## Credits - Credits to [Aceternity UI](https://ui.aceternity.com/components/bento-grid) and [Magic UI](https://magicui.design/docs/components/bento-grid) for this fantastic component. URL: https://inspira-ui.com/docs/components/miscellaneous/book --- title: Book description: A 3D book component featuring customizable sizes and color gradients. --- ```vue ``` ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code in the same folder ::code-group :CodeViewerTab{label="Book.vue" language="vue" componentName="Book" type="ui" id="book"} :CodeViewerTab{label="BookHeader.vue" language="vue" componentName="BookHeader" type="ui" id="book"} :CodeViewerTab{label="BookTitle.vue" language="vue" componentName="BookTitle" type="ui" id="book"} :CodeViewerTab{label="BookDescription.vue" language="vue" componentName="BookDescription" type="ui" id="book"} ```ts [index.ts] export const BOOK_RADIUS_MAP = { sm: "rounded-sm", md: "rounded-md", lg: "rounded-lg", xl: "rounded-xl", } as const; export const BOOK_SIZE_MAP = { sm: { width: "180px", spineTranslation: "152px" }, md: { width: "220px", spineTranslation: "192px" }, lg: { width: "260px", spineTranslation: "232px" }, xl: { width: "300px", spineTranslation: "272px" }, } as const; export const BOOK_SHADOW_SIZE_MAP = { sm: "-5px 0 15px 5px var(--shadowColor)", md: "-7px 0 25px 7px var(--shadowColor)", lg: "-10px 0 35px 10px var(--shadowColor)", xl: "-12px 0 45px 12px var(--shadowColor)", } as const; export const BOOK_COLOR_MAP = { slate: { from: "from-slate-900", to: "to-slate-700" }, gray: { from: "from-gray-900", to: "to-gray-700" }, zinc: { from: "from-zinc-900", to: "to-zinc-700" }, neutral: { from: "from-neutral-900", to: "to-neutral-700" }, stone: { from: "from-stone-900", to: "to-stone-700" }, red: { from: "from-red-900", to: "to-red-700" }, orange: { from: "from-orange-900", to: "to-orange-700" }, amber: { from: "from-amber-900", to: "to-amber-700" }, yellow: { from: "from-yellow-900", to: "to-yellow-700" }, lime: { from: "from-lime-900", to: "to-lime-700" }, green: { from: "from-green-900", to: "to-green-700" }, emerald: { from: "from-emerald-900", to: "to-emerald-700" }, teal: { from: "from-teal-900", to: "to-teal-700" }, cyan: { from: "from-cyan-900", to: "to-cyan-700" }, sky: { from: "from-sky-900", to: "to-sky-700" }, blue: { from: "from-blue-900", to: "to-blue-700" }, indigo: { from: "from-indigo-900", to: "to-indigo-700" }, violet: { from: "from-violet-900", to: "to-violet-700" }, purple: { from: "from-purple-900", to: "to-purple-700" }, fuchsia: { from: "from-fuchsia-900", to: "to-fuchsia-700" }, pink: { from: "from-pink-900", to: "to-pink-700" }, rose: { from: "from-rose-900", to: "to-rose-700" }, } as const; export type BookColor = keyof typeof BOOK_COLOR_MAP; export type BookSize = keyof typeof BOOK_SIZE_MAP; export type BookRadius = keyof typeof BOOK_RADIUS_MAP; export type BookShadowSize = keyof typeof BOOK_SHADOW_SIZE_MAP; export { default as Book } from "./Book.vue"; export { default as BookHeader } from "./BookHeader.vue"; export { default as BookTitle } from "./BookTitle.vue"; export { default as BookDescription } from "./BookDescription.vue"; ``` :: ## API ### Components props ::steps{level=4} #### `Book` | Prop Name | Type | Default | Description | | ------------ | ------- | ------- | --------------------------------------------- | | `class` | String | - | Additional classes for styling the component. | | `duration` | Number | 1000 | Animation duration in milliseconds. | | `color` | String | "zinc" | Color theme for the book gradient. | | `isStatic` | Boolean | false | Disables hover animations when true. | | `size` | String | "md" | Size variant of the book. | | `radius` | String | "md" | Border radius variant of the book. | | `shadowSize` | String | "lg" | Shadow size variant of the book. | #### `BookHeader` | Prop Name | Type | Default | Description | | --------- | ------ | ------- | -------------------------------------- | | `class` | String | - | Additional classes for custom styling. | #### `BookTitle` | Prop Name | Type | Default | Description | | --------- | ------ | ------- | -------------------------------------- | | `class` | String | - | Additional classes for custom styling. | #### `BookDescription` | Prop Name | Type | Default | Description | | --------- | ------ | ------- | -------------------------------------- | | `class` | String | - | Additional classes for custom styling. | :: ## Credits - Credits to [x/UI](https://ui.3x.gl/docs/book) for inspiring this component. - Credits to [kalix127](https://github.com/kalix127) for porting this component. URL: https://inspira-ui.com/docs/components/miscellaneous/compare --- title: Compare description: Slide to compare any two pieces of content - images, designs, code, or custom elements --- ```vue ``` ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code in the same folder ::code-group :CodeViewerTab{label="Compare.vue" language="vue" componentName="Compare" type="ui" id="compare"} :CodeViewerTab{label="StarField.vue" language="vue" componentName="StarField" type="ui" id="compare"} :: ## Examples Drag handle with custom content ```vue ``` AutoPlay ```vue ``` Custom Content with AutoPlay ```vue ``` ## API ### Props | Prop Name | Type | Default | Description | | ------------------------- | ------------------- | ---------------- | ----------------------------------------- | | `firstImage` | `string` | `""` | URL of the first image | | `secondImage` | `string` | `""` | URL of the second image | | `firstImageAlt` | `string` | `"First image"` | Alt text for first image | | `secondImageAlt` | `string` | `"Second image"` | Alt text for second image | | `class` | `string` | `""` | Additional classes for the component | | `firstContentClass` | `string` | `""` | Classes applied to first content wrapper | | `secondContentClass` | `string` | `""` | Classes applied to second content wrapper | | `initialSliderPercentage` | `number` | `50` | Initial position of slider (0-100) | | `slideMode` | `"hover" \| "drag"` | `"hover"` | Interaction mode for the slider | | `showHandlebar` | `boolean` | `true` | Show/hide the handle bar | | `autoplay` | `boolean` | `false` | Enable/disable autoplay | | `autoplayDuration` | `number` | `5000` | Duration of autoplay cycle in ms | ### Events | Event Name | Payload | Description | | ------------------- | -------- | -------------------------------------------- | | `update:percentage` | `number` | Emitted when slider position changes (0-100) | | `drag:start` | - | Emitted when dragging starts | | `drag:end` | - | Emitted when dragging ends | | `hover:enter` | - | Emitted when mouse enters component | | `hover:leave` | - | Emitted when mouse leaves component | ### Slots | Slot Name | Default Content | Description | | ---------------- | ------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | | `first-content` | `` element if `firstImage` prop is provided | Content shown on the left/first side of the comparison. Has full access to component width/height. | | `second-content` | `` element if `secondImage` prop is provided | Content shown on the right/second side of the comparison. Has full access to component width/height. | | `handle` | Default slider handle with dots icon | Custom handle for the slider. Automatically positioned at the dividing line. Should handle positioning with absolute positioning. | ## Credits - Credits to [M Atif](https://github.com/atif0075) for this component. - Inspired from [Aceternity UI's Compare](https://ui.aceternity.com/components/compare). URL: https://inspira-ui.com/docs/components/miscellaneous/container-scroll --- title: Container Scroll description: A container scrolling effect that transforms the content inside based on scroll progress. Features smooth transitions with scaling and rotating effects on scroll. --- ```vue ``` ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code in the same folder ::code-group :CodeViewerTab{label="ContainerScroll.vue" language="vue" componentName="ContainerScroll" type="ui" id="container-scroll"} :CodeViewerTab{label="ContainerScrollTitle.vue" language="vue" componentName="ContainerScrollTitle" type="ui" id="container-scroll"} :CodeViewerTab{label="ContainerScrollCard.vue" language="vue" componentName="ContainerScrollCard" type="ui" id="container-scroll"} :: ## API ::steps ### `ContainerScroll` The `ContainerScroll` component creates a 3D scroll effect. As the user scrolls, the content inside the container is transformed with scale, rotation, and translation effects. #### Props | Prop Name | Type | Default | Description | | ------------ | ------ | ------- | ----------------------------------------------------------------------------- | | `rotate` | Number | `0` | Controls the rotation of the inner content based on the scroll progress. | | `scale` | Number | `1` | Controls the scaling transformation applied to the content during the scroll. | | `translateY` | Number | `0` | Controls the vertical translation of the title during the scroll. | #### Usage ```vue [ContainerScroll.vue] ``` ### `ContainerScrollTitle` The `ContainerScrollTitle` component handles the title's transformation as the user scrolls, applying a vertical translation effect. #### Props | Prop Name | Type | Default | Description | | ----------- | ------ | ------- | ----------------------------------------------- | | `translate` | Number | `0` | Controls the vertical translation of the title. | #### Usage ```vue [ContainerScrollTitle.vue] ``` ### `ContainerScrollCard` The `ContainerScrollCard` component applies scale and rotation effects to the card content as the user scrolls through the page. #### Props | Prop Name | Type | Default | Description | | --------- | ------ | ------- | ------------------------------------------------ | | `rotate` | Number | `0` | Controls the rotation effect of the card. | | `scale` | Number | `1` | Controls the scaling effect applied to the card. | #### Usage ```vue [ContainerScrollCard.vue] ``` :: ## Features - **3D Scroll Effects**: The content transforms based on scroll progress, including rotation, scaling, and translation. - **Responsive Design**: Adjusts behavior dynamically for mobile and desktop views. - **Smooth Transitions**: Leverages CSS keyframes and scroll-based transformations for a fluid user experience. ## CSS Variables To customize the scroll animations and responsiveness, you can set the following CSS variables: - **`--scale-start`**: Initial scale value for the card. - **`--scale-end`**: Final scale value for the card as the scroll progresses. - **`--rotate-start`**: Initial rotation value for the card. - **`--rotate-end`**: Final rotation value for the card as the scroll progresses. ## Features - **Dynamic Transformations**: Based on scroll position, the content scales, rotates, and translates for a 3D effect. - **Flexible Content**: Place any custom content inside the title and card slots. - **Responsive**: Adjusts for mobile and desktop, providing a consistent experience across devices. ## Credits - Inspired by [Aceternity UI Container Scroll Animation](https://ui.aceternity.com/components/container-scroll-animation). URL: https://inspira-ui.com/docs/components/miscellaneous/dock --- title: Dock description: A macOS-style dock with magnifying icons as you hover over them. --- ```vue ``` ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code in the same folder ::code-group :CodeViewerTab{filename="Dock.vue" language="vue" componentName="Dock" type="ui" id="dock"} :CodeViewerTab{filename="DockIcon.vue" language="vue" componentName="DockIcon" type="ui" id="dock"} :CodeViewerTab{filename="DockSeparator.vue" language="vue" componentName="DockSeparator" type="ui" id="dock"} :CodeViewerTab{filename="index.ts" language="ts" componentName="index" extension="ts" type="ui" id="dock"} :CodeViewerTab{filename="types.ts" language="ts" componentName="types" extension="ts" type="ui" id="dock"} :CodeViewerTab{filename="injectionKeys.ts" language="ts" componentName="injectionKeys" extension="ts" type="ui" id="dock"} :: ## API ::steps ### `Dock` | Prop Name | Type | Description | | --------------- | -------- | --------------------------------------------------------------------- | | `class` | `string` | Additional classes to apply to the dock container. | | `magnification` | `number` | Magnification factor for the dock icons on hover (default: 60). | | `distance` | `number` | Distance from the icon center where magnification applies. | | `direction` | `string` | Alignment of icons (`top`, `middle`, `bottom`) (default: middle). | | `orientation` | `string` | Orientation of Dock (`vertical`, `horizontal`) (default: horizontal). | | Slot Name | Description | | --------- | ---------------------------------------------------- | | `default` | Dock Dock or other child components to be displayed. | ### `DockIcon` | Slot Name | Description | | --------- | ------------------------------------------------------- | | `default` | Component or icon to be displayed inside the dock icon. | :: ## Credits - Credits to macOS Dock for the design inspiration and the fantastic hover magnification effect. URL: https://inspira-ui.com/docs/components/miscellaneous/expandable-gallery --- title: Expandable Gallery description: A responsive image gallery with an interactive hover effect that expands images dynamically. --- ```vue ``` ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code ```vue ``` ## API | Prop Name | Type | Default | Description | | --------- | ---------- | ------- | ---------------------------------------------- | | `images` | `string[]` | `[]` | Array of image URLs to display in the gallery. | ## Features - **Interactive Hover Effect**: Images expand when hovered over, creating a dynamic and engaging user experience. - **Responsive Design**: The gallery automatically adjusts to the container size, ensuring it looks great on all devices. - **Smooth Transitions**: Includes smooth scaling animations for a polished visual effect. - **Customizable Content**: Easily update the `images` array to change the gallery's content. ## Credits - Inspired from [Expandable Gallery Component by David Mráz](https://x.com/davidm_ml/status/1872319793124282653) URL: https://inspira-ui.com/docs/components/miscellaneous/images-slider --- title: Images Slider description: A full page slider with images that can be navigated with the keyboard. --- ```vue ``` ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code ```vue ``` ## API | Prop Name | Type | Default | Description | | ------------------ | -------------------------- | ------------------------------------------------- | ------------------------------------------------------------------------------ | | `images` | `string[]` | `[]` | An array of image URLs to show in the slider. | | `hideOverlay` | `boolean` | `false` | Don't create an overlay for the image slider. Slot won't be rendered. | | `overlayClass` | `string` | `''` | A class string to be applied to the overlay container. | | `imageClass` | `string` | `'bg-cover bg-center bg-no-repeat'` | Class string to apply to each of the images. | | `enterFromClass` | `string` | `'scale-0 origin-center'` | Class string applied to the 'enter-from-class' prop on the image transition. | | `enterActiveClass` | `string` | `'transition-transform duration-300 ease-in-out'` | Class string applied to the 'enter-active-class' prop on the image transition. | | `leaveActiveClass` | `string` | `'transition-transform duration-300 ease-in-out'` | Class string applied to the 'leave-active-class' prop on the image transition. | | `autoplay` | `boolean\|number` | `false` | Autoplay interval in ms, or `false` to disable. | | `direction` | `'vertical'\|'horizontal'` | `'vertical'` | The axis on which the slider should operate. | | `perspective` | `string` | `'1000px'` | The perspective to apply to the slider container. | | `modelValue` | `number` | `0` | Two-way binding for the current slide image index. | ## Features - **Horizontal & Vertical Animations**: You can animate the images horizontally (default) or vertically with the `direction` prop. - **Preloaded Images**: Images are preloaded before showing, preventing flickering loading animation. - **Customisable Autoplay**: Automatically transition through your slides, or allow your users to navigate manually. - **Overlay Anything**: The default slot allows you to overlay whatever content you wish overlay slider. ## Credits - Component by [Craig Riley](https://github.com/craigrileyuk) for porting this component. - Credits to [Aceternity UI](https://ui.aceternity.com/components/images-slider) for inspiring this component. URL: https://inspira-ui.com/docs/components/miscellaneous/lens --- title: Lens description: A lens component to zoom into images, videos, or practically anything. --- ```vue ``` ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code in the same folder ::code-group :CodeViewerTab{label="Lens.vue" language="vue" componentName="Lens" type="ui" id="lens"} :CodeViewerTab{label="Rays.vue" language="vue" componentName="Rays" type="examples" id="lens"} :CodeViewerTab{label="Beams.vue" language="vue" componentName="Beams" type="examples" id="lens"} :: ## Examples Lens are static in center ```vue ``` ## API | Prop Name | Type | Default | Description | | ------------ | -------------------------- | -------------------- | ---------------------------------------------------------------------------- | | `zoomFactor` | `number` | `1.5` | The magnification factor for the lens. | | `lensSize` | `number` | `170` | The diameter of the lens in pixels. | | `position` | `{ x: number, y: number }` | `{ x: 200, y: 150 }` | The static position of the lens (when isStatic is true). | | `isStatic` | `boolean` | `false` | If true, the lens stays in a fixed position; if false, it follows the mouse. | | `hovering` | `boolean` | `"false"` | External control for the hover state. | ## Features - **Slot Support**: Easily add any content inside the component using the default slot. ## Credits - Credits to [Aceternity UI](https://ui.aceternity.com/components/lens). - Credits to [SivaReddy Uppathi](https://github.com/sivareddyuppathi) for porting this component. URL: https://inspira-ui.com/docs/components/miscellaneous/link-preview --- title: Link Preview description: Dynamic link previews for your anchor tags --- ```vue ``` ::alert{type="info"} **Note:** This component uses `qss` npm package as a dependency. :: ## Install using CLI ```vue ``` ## Install Manually ::steps{level=4} #### Install the dependencies ::code-group ```bash [npm] npm install qss ``` ```bash [pnpm] pnpm install qss ``` ```bash [bun] bun add qss ``` ```bash [yarn] yarn add qss ``` :: Copy and paste the following code ```vue ``` :: ## API | Prop Name | Type | Default | Description | | ----------- | --------- | ------- | ------------------------------------------------------------------------------------------- | | `class` | `string` | `""` | Custom class applied to the main element. | | `linkClass` | `string` | `""` | Custom class applied to the link element. | | `width` | `number` | `200` | Width of the preview image. | | `height` | `number` | `125` | Height of the preview image. | | `isStatic` | `boolean` | `false` | Determines if the preview image is static or a URL preview (set to `true` for static mode). | | `imageSrc` | `string` | `""` | The source of the image to display (required if `isStatic` is `true`). | | `url` | `string` | `""` | URL for the link and for generating the preview image (required if `isStatic` is `false`). | ## Credits - Credits to [M Atif](https://github.com/atif0075) for porting this component. - Ported from [Aceternity UI's Link Preview](https://ui.aceternity.com/components/link-preview). URL: https://inspira-ui.com/docs/components/miscellaneous/marquee --- title: Marquee description: A customizable scrolling component that loops its content horizontally or vertically, with configurable direction, hover pause, and repeat options. --- ```vue ``` ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code in the same folder ::code-group :CodeViewerTab{label="Marquee.vue" language="vue" componentName="Marquee" type="ui" id="marquee"} :CodeViewerTab{label="ReviewCard.vue" language="vue" componentName="ReviewCard" type="examples" id="marquee"} :: ## API | Prop Name | Type | Default | Description | | -------------- | --------- | ------- | ------------------------------------------------------------------------- | | `class` | `string` | `''` | Custom CSS classes to apply to the outermost container of the marquee. | | `reverse` | `boolean` | `false` | Sets the scrolling direction to reverse (right to left or bottom to top). | | `pauseOnHover` | `boolean` | `false` | Pauses the marquee animation when hovered. | | `vertical` | `boolean` | `false` | Sets the scrolling direction to vertical instead of horizontal. | | `repeat` | `number` | `4` | Number of times the content inside the marquee should be repeated. | ## Features - **Horizontal & Vertical Scrolling**: You can scroll the content horizontally (default) or vertically with the `vertical` prop. - **Reverse Direction**: Enable reverse scrolling for dynamic effects using the `reverse` prop. - **Pause on Hover**: Pauses the scrolling animation when the user hovers over the marquee. - **Content Repetition**: The `repeat` prop controls how many times the content inside the marquee will loop. - **Custom Duration and Gap**: You can control the animation duration and gap between the repeated items using CSS variables `--duration` and `--gap`. ## CSS Variables You can customize the speed and gap between the items by setting the following CSS variables: - **`--duration`**: Controls the speed of the marquee animation. - **`--gap`**: Sets the space between repeated items in the marquee. ## Features - **Fully Customizable**: Easily adjust the duration, gap, direction, and hover behavior to suit your needs. - **Smooth Transitions**: The component uses CSS keyframes to achieve smooth scrolling and transitions. - **Multi-Directional**: Scroll content either horizontally or vertically with a simple prop change. - **Content Flexibility**: Place any Vue components or HTML elements inside the marquee slot for dynamic content scrolling. ## Credits - Inspired by [Magic UI](https://magicui.design/docs/components/marquee). URL: https://inspira-ui.com/docs/components/miscellaneous/morphing-tabs --- title: Morphing Tabs description: This is a morphing tabs interaction, recreated by Preet's work and featuring the gooey effect component. --- ```vue ``` ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code ```vue ``` ## API | Prop Name | Type | Default | Description | | ------------------ | ---------- | ------- | ---------------------------------------------- | | `class` | `string` | `""` | Additional class names to style the component. | | `tabs` | `string[]` | `[]` | Tabs. | | `activeTab` | `string` | `""` | Current active Tab. | | `margin` | `number` | `20` | Active tab margin left and right. | | `blurStdDeviation` | `number` | `6` | Svg blur stdDeviation, tab rounded use it. | ## Credits - Credits to [Whbbit1999](https://github.com/Whbbit1999) for this component. - Inspired and ported from [@Preet "Exclusion tabs"](https://x.com/wickedmishra/status/1823026659894940124). URL: https://inspira-ui.com/docs/components/miscellaneous/multi-step-loader --- title: Multi Step Loader description: A step loader for screens that works with async conditions too. --- ```vue ``` ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code ```vue ``` ## API | Prop Name | Type | Default | Description | | ----------------- | --------- | ------- | ---------------------------------------------------------------------------- | | `loading` | `boolean` | `false` | Controls the visibility of the loader. When `true`, the loader is displayed. | | `steps` | `Step[]` | `[]` | Array of step objects defining the loading sequence. | | `defaultDuration` | `number` | `1500` | The duration of each step in milliseconds. | | `preventClose` | `boolean` | `false` | If `true`, the close button will not be shown. | | Event Name | Payload Type | Description | | -------------- | ------------ | -------------------------------------------------------------------- | | `state-change` | `number` | Emitted when the current step changes, providing the new step index. | | `complete` | `void` | Emitted when all steps have been completed. | | `close` | `void` | Emitted when the loader is closed by button. | ## Credits - Credits to [M Atif](https://github.com/atif0075) for this component. - Inspired from [Aceternity UI's Multi Step Loader](https://ui.aceternity.com/components/multi-step-loader). URL: https://inspira-ui.com/docs/components/miscellaneous/photo-gallery --- title: Photo Gallery description: Showcase your team with pride using our stunning Photo Gallery Component. --- ```vue ``` ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code ```vue ``` ## API | Prop Name | Type | Default | Description | | ---------------- | ------------------- | ------- | ------------------------------------------------------ | | `items` | `"[{src: string}]"` | `[]` | Pass items / image src to animate | | `containerClass` | `string` | `""` | Additional tailwind CSS classes for container styling. | | `class` | `string` | `""` | Additional tailwind CSS classes for custom styling. | ## Credits - All images from [Pexels](https://www.pexels.com/@soldiervip/) - Thanks to [SivaReddy Uppathi](https://github.com/sivareddyuppathi) for providing this component. URL: https://inspira-ui.com/docs/components/miscellaneous/scroll-island --- title: Scroll Island description: A dynamic and interactive component that displays scroll progress with animated visuals and an expandable area for additional content. --- ```vue ``` ::alert{type="info"} **Note:** This component requires `@number-flow/vue` as a dependency. :: ## Install using CLI ```vue ``` ## Install Manually ::steps{level=4} #### Install the dependencies ::code-group ```bash [npm] npm install @number-flow/vue ``` ```bash [pnpm] pnpm install @number-flow/vue ``` ```bash [bun] bun add @number-flow/vue ``` ```bash [yarn] yarn add @number-flow/vue ``` :: Copy and paste the following code ```vue ``` :: ## API | Prop Name | Type | Default | Description | | --------- | -------- | ------------ | ----------------------------------------------- | | `class` | `string` | `""` | Additional CSS classes for custom styling. | | `title` | `string` | `"Progress"` | Title displayed in the header of the component. | | `height` | `string` | `44` | Height of the component. | ## Features - **Scroll Progress Tracking**: Dynamically displays the scroll progress of the page as a percentage. - **Expandable Layout**: Transforms between a circular and a rectangular layout based on user interaction. - **Animated Circular Progress Bar**: Displays a visually appealing progress bar with smooth transitions. - **Dynamic Content Slot**: Supports additional content in the expandable section. - **Dark Mode Support**: Adapts to the dark or light mode of the user's system preferences. ## Credits - Inspired by the work of [Ali Samadi](https://x.com/alisamadi__/status/1854312982559502556) & [Nitish Khagwal](https://x.com/nitishkmrk) - [NumberFlow by Maxwell Barvian](https://number-flow.barvian.me/vue) for number formatting and animations. URL: https://inspira-ui.com/docs/components/miscellaneous/shader-toy --- title: Shader Toy Viewer description: A powerful and flexible component to render interactive GLSL shaders from ShaderToy in the browser. --- ```vue ``` ## API | Prop Name | Type | Default | Description | | ------------ | -------------------- | --------- | --------------------------------------------------------- | | `shaderCode` | `string` | `-` | GLSL fragment shader source code from ShaderToy. | | `mouseMode` | `'click' \| 'hover'` | `'click'` | Mouse tracking mode: either on click or continuous hover. | | `hue` | `number` | `0` | Adjust the hue of the shader output. | | `saturation` | `number` | `1` | Adjust the saturation of the shader output. | | `brightness` | `number` | `1` | Adjust the brightness of the shader output. | | `speed` | `number` | `1` | Adjust the speed of the shader output. | | `class` | `string` | `-` | Custom classes to apply to the container. | ## Installation Make sure to include and install `ogl` (for rendering) in your project. ::pm-install{name="ogl"} :: ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code: ::code-group ::CodeViewerTab{filename="ShaderToy.vue" language="vue" componentName="ShaderToy" type="ui" id="shader-toy"} :: ::CodeViewerTab{filename="InspiraShaderToy.ts" language="typescript" icon="vscode-icons:file-type-typescript" componentName="InspiraShaderToy" type="ui" id="shader-toy" extension="ts"} :: :: ## Features - **Shadertoy-Compatible**: Supports Shadertoy-style `mainImage`, `iTime`, `iResolution`, `iMouse`, and more. - **GLSL Shader Rendering**: Render full-featured ShaderToy-like fragment shaders. - **iMouse Support**: Interactive shaders with real-time mouse input (click or hover). - **HSV Color Control**: Dynamically adjust shader hue, saturation, and brightness. - **Responsive Design**: Automatically adjusts canvas size with container resizing. - **Runtime Control**: Play, pause, and reset shaders dynamically. ## Notes - Converts and wraps Shadertoy-style shaders to work in a WebGL2 environment. - Color control (`hue`, `saturation`, `brightness`) is applied as a post-processing step to simulate HSV adjustments. ## Credits - Built with [OGL](https://github.com/oframe/ogl). - Inspired by [Shadertoy](https://shadertoy.com/) and adapted for Vue compatibility. URL: https://inspira-ui.com/docs/components/miscellaneous/svg-mask --- title: SVG Mask description: A dynamic SVG mask component that reveals content with hover and mouse movement. --- ```vue ``` ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code in the same folder ::code-group :CodeViewerTab{label="SVGMask.vue" language="vue" componentName="SVGMask" type="ui" id="svg-mask"} ```html [mask.svg] ``` :: ## API | Prop Name | Type | Default | Description | | ------------ | -------- | ------- | ------------------------------------------ | | `class` | `string` | `""` | Additional CSS classes for custom styling. | | `size` | `number` | `10` | Initial size of the mask in pixels. | | `revealSize` | `number` | `600` | Size of the mask during hover in pixels. | ## Features - **Hover-Activated Mask**: The SVG mask dynamically enlarges when hovered, revealing the content beneath. - **Mouse Tracking**: The mask follows the cursor, creating an engaging and interactive effect. - **Customizable Mask Size**: Adjust the initial size (`size`) and hover size (`revealSize`) for different effects. - **Slot-Based Content**: Supports named slots for base and reveal content, making it flexible for various use cases. - **Responsive Background**: Includes hover-based background color transitions for added visual appeal. ## Credits - Ported from [Aceternity UI's SVG Mask Effect](https://ui.aceternity.com/components/text-generate-effect). URL: https://inspira-ui.com/docs/components/miscellaneous/testimonial-slider --- title: Testimonial Slider description: A lightweight testimonial slider with image rotation, text transitions, and optional auto‑rotation. --- ```vue ``` ## API | Prop Name | Type | Default | Description | | -------------- | ------------------------------------------------------------------- | ------- | ---------------------------------------------------------------------- | | `testimonials` | `Array<{ img: string; quote: string; name: string; role: string }>` | `[]` | Array of testimonial objects displayed by the slider. | | `autoRotate` | `boolean` | `true` | If `true`, the slider advances automatically every `duration` seconds. | | `duration` | `number` | `5` | Interval in seconds between slides when auto‑rotation is enabled. | ## Install using CLI ```vue ``` ## Install Manually You can copy and paste the following code to create this component: ::code-group ::CodeViewerTab{label="TestimonialSlider.vue" language="vue" componentName="TestimonialSlider" type="ui" id="testimonial-slider"} :: :: ## Features - **Avatar & Quote Pairing** — Images animate with a subtle rotation while quotes fade/slide in. - **Auto‑Rotation** — Enable continuous cycling with the `autoRotate` prop. - **Height Fix Utility** — Ensures the container height remains stable during transitions. - **Manual Navigation** — Prev / next arrow buttons for user control. - **CSS‑Driven Animations** — Uses Vue `` and custom CSS for smooth effects, no extra libraries required. - **Fully Responsive** — Adjusts gracefully across screen sizes. URL: https://inspira-ui.com/docs/components/miscellaneous/timeline --- title: Timeline description: A visually appealing and interactive timeline component with smooth animations, sticky labels, and a gradient scrolling effect. --- ```vue ``` ## API | Prop Name | Type | Default | Description | | ---------------- | ---------------------------------- | ------- | -------------------------------------------------- | | `containerClass` | `string` | `""` | Additional CSS classes for the timeline container. | | `class` | `string` | `""` | Additional CSS classes for styling. | | `items` | `{ id: string; label: string; }[]` | `[]` | List of timeline items, each with an ID and label. | | `title` | `string` | `""` | Title of the timeline section. | | `description` | `string` | `""` | Description text displayed below the title. | ## Install using CLI ```vue ``` ## Install Manually You can copy and paste the following code to create this component: ::code-group ::CodeViewerTab{label="Timeline.vue" language="vue" componentName="Timeline" type="ui" id="timeline"} :: :: ## Features - **Animated Scroll Effect**: The timeline bar animates smoothly as the user scrolls. - **Sticky Labels**: Each event label remains visible while scrolling. - **Gradient Progress Bar**: A visually appealing timeline indicator with gradient effects. - **Slot Support**: Custom content can be placed within each timeline item. - **Responsive Design**: Adapts seamlessly to different screen sizes. - **Dark Mode Support**: Automatically adjusts to light or dark themes. ## Credits - Inspired and ported from [Aceternity UI's Timeline](https://ui.aceternity.com/components/timeline). URL: https://inspira-ui.com/docs/components/miscellaneous/tracing-beam --- title: Tracing Beam description: A component that renders a tracing beam effect with dynamic scrolling animations and gradient strokes. --- ```vue ``` ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code ```vue ``` ## API | Prop Name | Type | Default | Description | | --------- | -------- | ------- | ------------------------------------------ | | `class` | `string` | `""` | Additional CSS classes for custom styling. | ## Features - **Dynamic Tracing Beam**: Renders a gradient tracing beam that follows the scroll position, adding a modern visual effect. - **Scroll-Based Animation**: As the user scrolls, the beam animates along a path with varying gradients, responding to scroll depth. - **Gradient Transition**: Smoothly transitions colors along the beam from cyan to purple with fading edges for a subtle effect. - **Slot-Based Content**: Supports a default slot to add content inside the tracing beam container. ## Credits - Ported from [Aceternity UI](https://ui.aceternity.com/components/tracing-beam); URL: https://inspira-ui.com/docs/components/special-effects/animated-beam --- title: Animated Beam description: An SVG beam connecting elements with animation. --- ```vue ``` ::alert{type="warning"} This component uses the `nuxt-only` syntax with the ``. If you are not using Nuxt, you can simply remove it. :: ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code ```vue ``` ## Example Double-sided beam. ```vue ``` Vertical beam. ```vue ``` ## API | Prop Name | Type | Default | Description | | -------------------- | ------------- | ---------------------- | ---------------------------------------------------------------------------- | | `class` | `string` | `""` | Additional CSS classes to apply to the component for customization. | | `containerRef` | `HTMLElement` | N/A | Reference to the container element where the beam is rendered. | | `fromRef` | `HTMLElement` | N/A | Reference to the starting element from which the beam originates. | | `toRef` | `HTMLElement` | N/A | Reference to the ending element where the beam points to. | | `curvature` | `number` | `0` | Controls the curvature of the beam; higher values create a more curved path. | | `reverse` | `boolean` | `false` | Reverses the animation direction of the beam if set to `true`. | | `pathColor` | `string` | `"gray"` | Color of the beam's path. | | `pathWidth` | `number` | `2` | Stroke width of the beam's path. | | `pathOpacity` | `number` | `0.2` | Opacity of the beam's path. | | `gradientStartColor` | `string` | `"#FFAA40"` | Starting color of the beam's gradient animation. | | `gradientStopColor` | `string` | `"#9C40FF"` | Ending color of the beam's gradient animation. | | `delay` | `number` | `0` | Delay before the beam's animation starts, in seconds. | | `duration` | `number` | `Random between 4–7 s` | Duration of the beam's animation cycle, in seconds. | | `startXOffset` | `number` | `0` | Horizontal offset for the beam's starting point. | | `startYOffset` | `number` | `0` | Vertical offset for the beam's starting point. | | `endXOffset` | `number` | `0` | Horizontal offset for the beam's ending point. | | `endYOffset` | `number` | `0` | Vertical offset for the beam's ending point. | ## Features - **Dynamic Beam Drawing**: Automatically renders a beam between two specified elements on the page. - **Smooth Animation**: Features a gradient animation that flows along the beam's path for a visually engaging effect. - **Customizable Appearance**: Easily adjust color, width, opacity, and curvature to match your design requirements. - **Responsive Updates**: The beam adjusts its position and size in response to window resizing and element repositioning. - **Flexible Animation Control**: Customize the animation's duration, delay, and direction for precise timing. ## Credits - Inspired and ported from [Magic UI Animated Beam](https://magicui.design/docs/components/animated-beam). URL: https://inspira-ui.com/docs/components/special-effects/border-beam --- title: Border Beam description: A stylish animated border beam effect with customizable size, duration, colors, and delay. --- ```vue ``` ::alert{type="warning"} This component uses the `nuxt-only` syntax with the ``. If you are not using Nuxt, you can simply remove it. :: ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code ```vue ``` ## API | Prop Name | Type | Default | Description | | ------------- | -------- | ----------- | --------------------------------------------------------------------- | | `class` | `string` | `""` | Additional CSS classes for custom styling. | | `size` | `number` | `200` | Size of the animated border beam effect. | | `duration` | `number` | `15` | Duration of the animation in seconds. | | `borderWidth` | `number` | `1.5` | Width of the border around the beam effect. | | `anchor` | `number` | `90` | Anchor point for the beam, determining its position along the border. | | `colorFrom` | `string` | `"#ffaa40"` | Starting color for the gradient of the beam. | | `colorTo` | `string` | `"#9c40ff"` | Ending color for the gradient of the beam. | | `delay` | `number` | `0` | Delay before the animation starts, in seconds. | ## Features - **Animated Border Beam**: Adds a dynamic border beam effect that animates around the border. - **Customizable Gradient Colors**: Adjust the `colorFrom` and `colorTo` props to create a gradient effect that suits your design. - **Flexible Animation Settings**: Control the size, duration, and delay of the animation to fine-tune the visual experience. - **Anchor Positioning**: Use the `anchor` prop to set the starting position of the beam along the border. ## Credits - Ported from [Magic UI](https://magicui.design/docs/components/border-beam). URL: https://inspira-ui.com/docs/components/special-effects/confetti --- title: Confetti description: A Vue component for confetti animations. --- ```vue ``` ::alert{type="info"} **Note:** This component uses `canvas-confetti` npm package as a dependency. :: ## Install using CLI ```vue ``` ## Install Manually ::steps{level=4} #### Install the dependencies ::code-group ```bash [npm] npm install canvas-confetti npm install -D @types/canvas-confetti ``` ```bash [pnpm] pnpm install canvas-confetti pnpm install -D @types/canvas-confetti ``` ```bash [bun] bun add canvas-confetti bun add -d @types/canvas-confetti ``` ```bash [yarn] yarn add canvas-confetti yarn add --dev @types/canvas-confetti ``` :: Copy and paste the following code ::code-group :CodeViewerTab{label="Confetti.vue" language="vue" componentName="Confetti" type="ui" id="confetti"} :CodeViewerTab{label="ConfettiButton.vue" language="vue" componentName="ConfettiButton" type="ui" id="confetti"} :: :: ## Examples ### Basic ```vue ``` ### Random Direction ```vue ``` ### Fireworks ```vue ``` ### Side Cannons ```vue ``` ## API ### Components props ::steps{level=4} #### `Confetti` | Prop Name | Type | Default | Description | | --------------- | ----------------------- | ------- | ----------------------------------------------------------------- | | `options` | `ConfettiOptions` | `{}` | Options for individual confetti bursts. | | `globalOptions` | `ConfettiGlobalOptions` | `{}` | Global options for the confetti instance (e.g., resize behavior). | | `manualstart` | `boolean` | `false` | If `true`, confetti won't start automatically on mount. | #### `ConfettiOptions` | Property | Type | Default | Description | | ------------------------- | --------------------------- | ------------------------------------------------------------------------------- | ---------------------------------------------------------------------- | | `particleCount` | `number` | `50` | The number of confetti particles to launch. | | `angle` | `number` | `90` | The angle in degrees at which to launch the confetti. | | `spread` | `number` | `45` | The spread in degrees of the confetti. | | `startVelocity` | `number` | `45` | The initial velocity of the confetti particles. | | `decay` | `number` | `0.9` | The rate at which confetti particles slow down. | | `gravity` | `number` | `1` | The gravity applied to confetti particles. | | `drift` | `number` | `0` | The horizontal drift applied to confetti particles. | | `ticks` | `number` | `200` | The number of animation frames the confetti should last. | | `origin` | `{ x: number, y: number }` | `{ x: 0.5, y: 0.5 }` | The origin point (from 0 to 1) of the confetti emission. | | `colors` | `string[]` | `['#26ccff', '#a25afd', '#ff5e7e', '#88ff5a', '#fcff42', '#ffa62d', '#ff36ff']` | Array of color strings in HEX format for the confetti particles. | | `shapes` | `string[]` | `['square', 'circle']` | Array of shapes for the confetti particles. | | `scalar` | `number` | `1` | Scaling factor for confetti particle sizes. | | `zIndex` | `number` | `100` | The z-index value for the confetti canvas element. | | `disableForReducedMotion` | `boolean` | `false` | Disables confetti for users who prefer reduced motion. | | `useWorker` | `boolean` | `true` | Use a Web Worker for better performance. | | `resize` | `boolean` | `true` | Whether to automatically resize the canvas when the window resizes. | | `canvas` | `HTMLCanvasElement \| null` | `null` | Custom canvas element to draw confetti on. | | `gravity` | `number` | `1` | The gravity applied to confetti particles. | | `drift` | `number` | `0` | The horizontal drift applied to particles. | | `flat` | `boolean` | `false` | If `true`, confetti particles will be flat (no rotation or 3D effect). | #### `ConfettiButton` | Prop Name | Type | Default | Description | | --------- | -------------------------------------------------- | ------- | ------------------------------------------------ | | `options` | `ConfettiOptions & { canvas?: HTMLCanvasElement }` | `{}` | Options for confetti when the button is clicked. | :: ## Features - **Confetti Animation**: Easily add confetti animations to your Vue application. - **Customizable Options**: Configure both global and individual options for confetti behavior. - **Manual Control**: Choose whether to start confetti automatically or manually trigger it. - **Button Integration**: Use the `ConfettiButton` component to trigger confetti on button clicks. ## Credits - Built using the [canvas-confetti](https://www.npmjs.com/package/canvas-confetti) library. - Ported from [Magic UI Confetti](https://magicui.design/docs/components/confetti). URL: https://inspira-ui.com/docs/components/special-effects/glow-border --- title: Glow Border description: An animated border effect. --- ```vue ``` ::alert{type="warning"} This component uses the `nuxt-only` syntax with the ``. If you are not using Nuxt, you can simply remove it. :: ## Installation ::alert Add following entry to inline theme in your `main.css` file. ```css @theme inline { --animate-glow: glow var(--duration) infinite linear; @keyframes glow { 0% { background-position: 0% 0%; } 50% { background-position: 100% 100%; } to { background-position: 0% 0%; } } } ``` :: ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code ```vue ``` ## API | Prop Name | Type | Default | Description | | -------------- | -------------------- | ------- | ---------------------------------------------------------- | | `duration` | `number` | `10` | Duration of the glowing border animation. | | `color` | `string \| string[]` | `#FFF` | Color or array of colors to applied on the glowing border. | | `borderRadius` | `number` | `10` | Radius of the border. | | `borderWidth` | `number` | `2` | Width of the border. | ## Credits - Credits to [Magic UI](https://magicui.design/docs/components/shine-border) for this fantastic component. URL: https://inspira-ui.com/docs/components/special-effects/glowing-effect --- title: Glowing Effect description: A dynamic proximity-based glow effect that reacts to mouse movements and scroll events, perfect for highlighting interactive elements. --- ```vue ``` ## API | Prop Name | Type | Default | Description | | ------------------ | ---------------------- | ----------- | ----------------------------------------------------------------------------------------------------- | | `blur` | `number` | `0` | The blur radius applied to the glow layer. | | `inactiveZone` | `number` | `0.7` | Defines the inner radius (as a fraction of the smallest dimension) within which the glow is inactive. | | `proximity` | `number` | `0` | Additional proximity distance (in pixels) to trigger the glow when the cursor is near the element. | | `spread` | `number` | `20` | Size of the spread of the glow effect around the element. | | `variant` | `"default" \| "white"` | `"default"` | Variant of the glow style (e.g., a white-themed version). | | `glow` | `boolean` | `false` | Controls the visibility of the static glow border. | | `class` | `string` | `""` | Additional CSS classes for custom styling. | | `disabled` | `boolean` | `true` | Disables the proximity detection and glow animations when `true`. | | `movementDuration` | `number` | `2` | Duration (in seconds) of the smooth rotation animation. | | `borderWidth` | `number` | `1` | Width (in pixels) of the border applied to the glow effect. | ## Install using CLI ```vue ``` ## Install Manually You can copy and paste the following code to create this component: ::code-group ::CodeViewerTab{label="GlowingEffect.vue" language="vue" componentName="GlowingEffect" type="ui" id="glowing-effect"} :: :: ## Features - **Proximity-Based Activation**: The glow effect is only active when the cursor is within a certain distance of the element. - **Smooth Angle Animation**: Gradually animates rotation based on pointer movement for an appealing dynamic glow. - **Configurable Glow Properties**: Fine-tune blur, spread, and proximity to achieve various visual effects. - **Variant Support**: Choose between default or white glow styling. - **Performance Optimizations**: Event listeners and animation frames are managed efficiently. ## Credits - Ported from (Aceternity UI Glowing Effect)[https://ui.aceternity.com/components/glowing-effect] URL: https://inspira-ui.com/docs/components/special-effects/meteors --- title: Meteor description: A component that displays a meteor shower animation with customizable meteor count and styling. --- ```vue ``` ::alert{type="warning"} This component uses the `nuxt-only` syntax with the ``. If you are not using Nuxt, you can simply remove it. :: ## API | Prop Name | Type | Default | Description | | --------- | -------- | ------- | ----------------------------------------------------------------- | | `count` | `number` | `20` | The number of meteors to display in the animation. | | `class` | `string` | `""` | Additional CSS classes to apply to the meteors for customization. | ## Installation ::alert Add following entry to inline theme in your `main.css` file. ```css @theme inline { --animate-meteor-effect: meteor 5s linear infinite; @keyframes meteor { 0% { transform: rotate(215deg) translateX(0); opacity: 1; } 70% { opacity: 1; } 100% { transform: rotate(215deg) translateX(-500px); opacity: 0; } } } ``` :: ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code ```vue ``` ## Features - **Meteor Shower Animation**: The component renders an animated meteor shower effect, adding a dynamic visual element to your application. - **Customizable Meteor Count**: Adjust the number of meteors by setting the `count` prop to control the density of the meteor shower. - **Randomized Animations**: Each meteor has randomized position, delay, and duration, creating a natural and varied animation. - **Styling Flexibility**: Pass additional CSS classes through the `class` prop to customize the appearance of the meteors. - **Responsive Design**: The component adapts to different screen sizes and uses Vue’s reactivity for smooth animations. ## Credits - Ported from [Aceternity UI's Meteor Effect](https://ui.aceternity.com/components/meteors) URL: https://inspira-ui.com/docs/components/special-effects/neon-border --- title: Neon Border description: A visually appealing neon border component with customizable animations and colors. --- ```vue ``` ## API | Prop Name | Type | Default | Description | | --------------- | ---------------------------- | ----------- | ----------------------------------------------- | | `color1` | `string` | `"#0496ff"` | Primary color of the neon border. | | `color2` | `string` | `"#ff0a54"` | Secondary color of the neon border. | | `animationType` | `"none" \| "half" \| "full"` | `"half"` | Type of animation effect applied to the border. | | `duration` | `number` | `6` | Duration of the animation effect in seconds. | | `class` | `string` | `""` | Additional CSS classes for styling. | ## Installation ::alert Add following entry to inline theme in your `main.css` file. ```css @theme inline { --animate-neon-border: neon-border var(--neon-border-duration) linear infinite; @keyframes neon-border { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } } ``` :: ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code in the same folder ::code-group ::CodeViewerTab{label="NeonBorder.vue" language="vue" componentName="NeonBorder" type="ui" id="neon-border"} :: :: ## Features - **Customizable Colors**: Allows setting primary and secondary neon colors. - **Three Animation Modes**: Supports `none`, `half`, and `full` animation effects. - **Adjustable Animation Duration**: Duration can be fine-tuned for different effects. - **Reactive Design**: Uses Vue’s reactivity system for dynamic updates. - **Scoped Styles**: Ensures styles do not interfere with other components. ## Credits - Inspired by modern neon border effects. URL: https://inspira-ui.com/docs/components/special-effects/particle-image --- title: Particle Image description: Visually appealing particle animation applied to images as seen on NuxtLabs.com --- ```vue ``` ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code in the same folder ::code-group :CodeViewerTab{label="ParticleImage.vue" language="vue" componentName="ParticleImage" type="ui" id="particle-image"} :CodeViewerTab{label="inspiraImageParticles.js" icon="vscode-icons:file-type-js" componentName="inspiraImageParticles" type="ui" id="particle-image" extension="js"} :CodeViewerTab{label="inspiraImageParticles.d.ts" icon="vscode-icons:file-type-typescriptdef" componentName="inspiraImageParticles" type="ui" id="particle-image" extension="d.ts"} :: ## API | Prop Name | Type | Default | Description | | ----------------- | ----------------------------------------------------------------------------- | -------- | ------------------------------------------------------------------------------- | | `imageSrc` | `string` | `null` | Source URL for the image to which the particle effect is applied. | | `class` | `string` | `null` | Additional CSS classes to apply to the image element. | | `canvasWidth` | `string` | `null` | Width of the particle effect canvas. | | `canvasHeight` | `string` | `null` | Height of the particle effect canvas. | | `gravity` | `string` | `null` | Gravity force affecting the particle movement. | | `particleSize` | `string` | `null` | Size of the particles. | | `particleGap` | `string` | `null` | Gap between particles. | | `mouseForce` | `string` | `null` | Force applied to particles based on mouse movement. | | `renderer` | `"default" \| "webgl"` | `null` | The renderer to use for particle generation, either default or WebGL. | | `color` | `string` | `#FFF` | Hexadecimal color code used for particles. Supports 3 or 6 character hex codes. | | `colorArr` | `number[]` | `null` | Array of numbers to define multiple particle colors. | | `initPosition` | `"random" \| "top" \| "left" \| "bottom" \| "right" \| "misplaced" \| "none"` | `random` | Initial position of the particles when the animation starts. | | `initDirection` | `"random" \| "top" \| "left" \| "bottom" \| "right" \| "none"` | `random` | Initial direction of the particles when the animation starts. | | `fadePosition` | `"explode" \| "top" \| "left" \| "bottom" \| "right" \| "random" \| "none"` | `none` | Position where the particles fade out. | | `fadeDirection` | `"random" \| "top" \| "left" \| "bottom" \| "right" \| "none"` | `none` | Direction in which the particles fade out. | | `noise` | `number` | `null` | Noise of the particles. | | `responsiveWidth` | `boolean` | `false` | Should the canvas be responsive. | ## Credits - Credits to [Nuxt Labs](https://nuxtlabs.com) for this inspiration. - Credits to [NextParticles](https://nextparticle.nextco.de) for the base of the animation library. URL: https://inspira-ui.com/docs/components/special-effects/scratch-to-reveal --- title: Scratch To Reveal description: The ScratchToReveal component creates an interactive scratch-off effect with customizable dimensions and animations, revealing hidden content beneath. --- ```vue ``` ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code ```vue ``` ## API | Prop Name | Type | Default | Description | | ---------------------- | ------------------------ | ------- | --------------------------------------------------------------------------------------------- | | `class` | `string` | `""` | The class name to apply to the component. | | `width` | `number` | `""` | Width of the scratch container. | | `height` | `number` | `""` | Height of the scratch container. | | `minScratchPercentage` | `number` | `50` | Minimum percentage of scratched area to be considered as completed (Value between 0 and 100). | | `gradientColors` | `[string,string,string]` | `-` | Gradient colors for the scratch effect. | | Event Name | Payload | Description | | ---------- | ------- | -------------------------------------------------- | | `complete` | `-` | Callback function called when scratch is completed | | Slot Name | Default Content | Description | | --------- | --------------- | -------------------------------------- | | `default` | `-` | The text below the scratch-off ticket. | ## Component Code You can copy and paste the following code to create this component: ```vue ``` ## Credits - Credits to [Whbbit1999](https://github.com/Whbbit1999) for this component. - Inspired by [MagicUI Scratch To Reveal](https://magicui.design/docs/components/scratch-to-reveal). URL: https://inspira-ui.com/docs/components/special-effects/spring-calendar --- title: Spring Calendar description: An animated calendar widget that expands to reveal events and features smooth, spring‑based Motion‑V transitions. --- ```vue ``` ## API | Prop Name | Type | Default | Description | | -------------- | -------------------------------------------------------------------------------------------------------------- | ------- | --------------------------------------------------------------------- | | `calendarData` | `Array<{ month: string; date: number; day: string; events?: { title: string; day: string; time: string }[] }>` | **—** | Array defining each calendar day and its optional events. _Required_. | | `initialIndex` | `number` | `0` | Day index initially selected. | ### Emits | Event | Payload | Description | | -------------------- | -------- | ------------------------------------------------------------------ | | `update:activeIndex` | `number` | Fires when a day button is clicked, emitting the new active index. | ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code ::code-group ::CodeViewerTab{label="SpringCalendar.vue" language="vue" componentName="SpringCalendar" type="ui" id="spring-calendar"} :: ::CodeViewerTab{label="TextMorph.vue" language="vue" componentName="TextMorph" type="ui" id="spring-calendar"} :: :: ## Features - **Spring Animations** — Uses `MotionConfig` to apply realistic spring/bounce transitions when height changes. - **Dynamic Height** — The outer card automatically grows to fit event listings. - **TextMorph Integration** — Day labels morph smoothly via the `TextMorph` sub‑component. - **Interactive Day Picker** — Clickable day chips with hover/press scale effects. - **Responsive Layout** — Flexbox layout that wraps chips and events neatly. ## Credits - Inspired from the work of [sekachov](https://x.com/sekachov) URL: https://inspira-ui.com/docs/components/text-animations/3d-text --- title: 3D Text description: A stylish 3D text component with customizable colors, shadows, and animation options. --- ```vue ``` ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code ```vue ``` ## API | Prop Name | Type | Default | Description | | ------------------- | --------- | ---------- | -------------------------------------------------- | | `textColor` | `string` | `"white"` | Color of the main text. | | `letterSpacing` | `number` | `-0.1` | Adjusts the spacing between letters in `ch` units. | | `strokeColor` | `string` | `"black"` | Color of the text stroke. | | `shadowColor` | `string` | `"yellow"` | Color of the text shadow. | | `strokeSize` | `number` | `20` | Thickness of the text stroke in pixels. | | `shadow1Size` | `number` | `7` | Size of the first shadow layer in pixels. | | `shadow2Size` | `number` | `10` | Size of the second shadow layer in pixels. | | `class` | `string` | `""` | Additional CSS classes for custom styling. | | `animate` | `boolean` | `true` | Enables wiggle animation when set to `true`. | | `animationDuration` | `number` | `1500` | Duration of the wiggle animation in milliseconds. | ## Features - **3D Text Effect**: Adds a three-dimensional stroke and shadow effect to text for a bold, layered look. - **Customizable Colors & Sizes**: Easily adjust text color, stroke size, shadow colors, and letter spacing. - **Wiggle Animation**: Includes an optional wiggle animation to make the text bounce for added emphasis. - **Flexible Animation Control**: Customize the animation speed with the `animationDuration` prop. URL: https://inspira-ui.com/docs/components/text-animations/blur-reveal --- title: Blur Reveal description: A component to smoothly blur fade in content. --- ```vue ``` ::alert{type="warning"} This component uses the `nuxt-only` syntax with the ``. If you are not using Nuxt, you can simply remove it. :: ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code ```vue ``` ## API | Prop Name | Type | Default | Description | | ---------- | -------- | ------- | ---------------------------------------------------------------------------- | | `duration` | `number` | `1` | Duration of the blur fade in animation. | | `delay` | `number` | `1` | Delay between child components to reveal | | `blur` | `string` | `10px` | Amount of blur to apply to the child components. | | `yOffset` | `number` | `20` | Specifies the vertical offset distance (yOffset) for the entrance animation. | ## Credits - Credits to [Magic UI](https://magicui.design/docs/components/blur-fade) for this fantastic component. URL: https://inspira-ui.com/docs/components/text-animations/box-reveal --- title: Box Reveal description: An animated box reveal effect with customizable colors, duration, and delay. --- ```vue ``` ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code ```vue ``` ## API | Prop Name | Type | Default | Description | | ---------- | -------- | ----------- | ---------------------------------------------------- | | `color` | `string` | `"#5046e6"` | Background color of the reveal box. | | `duration` | `number` | `0.5` | Duration of the reveal animation in seconds. | | `delay` | `number` | `0.25` | Delay before the reveal animation starts in seconds. | | `class` | `string` | `""` | Additional CSS classes for custom styling. | ## Features - **Box Reveal Animation**: Creates a sliding box reveal effect with smooth transitions. - **Customizable Animation**: Control the animation timing with the `duration` and `delay` props. - **Slot-Based Content**: Supports default slot content that appears once the reveal animation completes. - **Custom Background Color**: Easily customize the box's background color using the `color` prop. ## Credits - Ported from [Magic UI Box Reveal](https://magicui.design/docs/components/box-reveal). URL: https://inspira-ui.com/docs/components/text-animations/colorful-text --- title: Colourful Text description: A text component with various colours, filter and scale effects. --- ```vue ``` ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code ```vue ``` ## API | Prop Name | Type | Default | Description | | ------------ | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------- | | `text` | `string` | `"black"` | The text string to be rendered with colorful animated characters. Each character will be individually animated with color transitions and motion effects. | | `colors` | `string[]` | `[ "rgb(131, 179, 32)", "rgb(47, 195, 106)", "rgb(42, 169, 210)", "rgb(4, 112, 202)", "rgb(107, 10, 255)", "rgb(183, 0, 218)", "rgb(218, 0, 171)", "rgb(230, 64, 92)", "rgb(232, 98, 63)", "rgb(249, 129, 47)", ]` | The text use colors. | | `startColor` | `string` | `"rgb(255,255,255)"` | The char start color. | | `duration` | `number` | `5` | The animation duration time in seconds. | ## Credits - Credits to [Whbbit1999](https://github.com/Whbbit1999) for this component. - Ported from [Aceternity UI Colourful Text](https://ui.aceternity.com/components/colourful-text) URL: https://inspira-ui.com/docs/components/text-animations/container-text-flip --- title: Container Text Flip description: A container that flips through words, animating the width. --- ```vue ``` ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code ```vue ``` ## Example Standard ```vue ``` Hero section with animation ```vue ``` ## API | Prop Name | Type | Default | Description | | ------------------- | ---------- | ---------------------------------------------- | ---------------------------------------------------- | | `words` | `string[]` | `["better", "modern", "beautiful", "awesome"]` | Array of words to cycle through in the animation | | `interval` | `number` | `3000` | Time in milliseconds between word transitions | | `animationDuration` | `number` | `700` | Duration of the transition animation in milliseconds | | `class` | `string` | `` | Additional CSS classes to apply to the container | | `textClass` | `string` | `` | Additional CSS classes to apply to the text | ## Credits - Credits to [Whbbit1999](https://github.com/Whbbit1999) for this component. - Ported from [Aceternity UI Container Text Flip](https://ui.aceternity.com/components/container-text-flip). URL: https://inspira-ui.com/docs/components/text-animations/flip-words --- title: Flip Words description: A component that flips through a list of words. --- ```vue ``` ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code ```vue ``` ## API | Prop Name | Type | Description | | ---------- | -------- | ------------------------------------------------------------------------------------------ | | `words` | `Array` | An array of words to be displayed and animated. | | `duration` | `number` | Duration (in milliseconds) for each word to be displayed before flipping to the next word. | | `class` | `string` | Additional CSS classes to apply to the component. | ## Credits - Credits to [M Atif](https://github.com/atif0075) for porting this component. - Ported from [Aceternity UI's Flip Words](https://ui.aceternity.com/components/flip-words) URL: https://inspira-ui.com/docs/components/text-animations/focus --- title: Focus description: Highlight words in a sentence with a dynamic blurred effect and animated focus frame. Supports auto-cycling or manual hover focus mode. --- ```vue ``` ## API | Prop Name | Type | Default | Description | | ------------------------ | --------- | ----------------- | -------------------------------------------------------------- | | `sentence` | `string` | `"Inspira Focus"` | Text sentence to display and animate word-by-word. | | `manualMode` | `boolean` | `false` | If true, focus highlights on hover; otherwise auto-cycles. | | `blurAmount` | `number` | `5` | Blur radius in pixels for inactive words. | | `borderColor` | `string` | `"green"` | Color of the animated focus frame border. | | `animationDuration` | `number` | `0.5` | Duration in seconds for the focus frame animation transitions. | | `pauseBetweenAnimations` | `number` | `1` | Pause duration in seconds between auto-focus transitions. | ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code: ```vue ``` ## Features - **Word-by-word focus**: Highlights individual words in a sentence with blur on inactive words. - **Auto or manual mode**: Cycle focus automatically or control it with mouse hover. - **Animated focus frame**: Smoothly animates a border frame around the focused word. - **Customizable styling**: Configure blur amount, border color, and animation timing. - **Responsive layout**: Supports flexible wrapping and alignment of words. ## Credits - Inspired from [Focus Text Hover Effect on CodePen](https://codepen.io/CameronFitzwilliam/pen/JJRjMa). URL: https://inspira-ui.com/docs/components/text-animations/hyper-text --- title: Hyper Text description: A hyper changing text animation as you hover.. --- ```vue ``` ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code ```vue ``` ## API | Prop Name | Type | Default | Description | | --------------- | --------- | -------- | --------------------------------------------------------- | | `class` | `string` | `""` | Additional CSS classes to apply to the component. | | `text` | `string` | Required | Text to animate | | `duration` | `number` | `0.8` | The total duration (in seconds) for the entire animation. | | `animateOnLoad` | `boolean` | `true` | Play animation on load | ## Credits - Inspired by [Magic UI's Hyper Text](https://magicui.design/docs/components/hyper-text) component. - Credits to [Prem](https://github.com/premdasvm) for porting this component. URL: https://inspira-ui.com/docs/components/text-animations/letter-pullup --- title: Letter Pullup description: Staggered letter pull up text animation. --- ```vue ``` ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code ```vue ``` ## API | Prop Name | Type | Default | Description | | --------- | -------- | -------------------------- | -------------------------------------------------- | | `class` | `string` | `-` | The class to be applied to the component. | | `words` | `string` | `Staggered Letter Pull Up` | Text to animate. | | `delay` | `number` | `0.05` | Delay each letter's animation by this many seconds | ## Credits - Credits to [SivaReddy Uppathi](https://github.com/sivareddyuppathi) for this component. - Inspired from [Magic UI](https://magicui.design/docs/components/letter-pullup). URL: https://inspira-ui.com/docs/components/text-animations/line-shadow-text --- title: Line Shadow Text description: A line shadow text component for Magic UI that adds a shadow effect to the text, making it visually appealing and engaging. --- ```vue ``` ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code ```vue ``` ## API | Prop Name | Type | Default | Description | | ------------- | -------- | --------- | ------------------------------------------ | | `shadowColor` | `string` | `"black"` | The color of the shadow effect | | `class` | `string` | `""` | Additional CSS classes for custom styling. | | `as` | `string` | `"span"` | The HTML element to render the text as. | ## Features - **Slot-Based Content**: Supports default slots for dynamic content, making it flexible for various use cases. ## Credits - Credits to [SivaReddy Uppathi](https://github.com/sivareddyuppathi) for this component. - Ported from [Magic UI's Line Shadow Text](https://magicui.design/docs/components/line-shadow-text) URL: https://inspira-ui.com/docs/components/text-animations/morphing-text --- title: Morphing Text description: This MorphingText component dynamically transitions between an array of text strings, creating a smooth, engaging visual effect. --- ```vue ``` ::alert{type="warning"} This component uses the `nuxt-only` syntax with the ``. If you are not using Nuxt, you can simply remove it. :: ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code ```vue ``` ## API | Prop Name | Type | Default | Description | | -------------- | ---------- | ------- | ------------------------------------- | | `texts` | `string[]` | `[]` | Array of texts to morph between. | | `class` | `string` | `""` | Additional classes for the container. | | `morphTime` | `number` | `1.5` | Animation execution time. | | `coolDownTime` | `number` | `0.5` | Animation dwell time. | ## Credits - Credits to [Whbbit1999](https://github.com/Whbbit1999) for this component. - Inspired and ported from [Magic UI Morphing Text](https://magicui.design/docs/components/morphing-text). URL: https://inspira-ui.com/docs/components/text-animations/number-ticker --- title: Number Ticker description: Animate numbers to count up or down to a target number --- ```vue ``` ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code ```vue ``` --- ## API | Prop Name | Type | Default | Description | | --------------- | ------------------- | -------------- | ----------------------------------------------------------------- | | `value` | `int` | `0` | Value to count to | | `direction` | `up \| down` | `up` | Direction to count in | | `decimalPlaces` | `number` | `0` | Number of decimal places to show | | `delay` | `number` | `0` | Delay before counting (in milliseconds) | | `duration` | `number` | `1000` | Total duration for the entire animation (in milliseconds). | | `transition` | `TransitionPresets` | `easeOutCubic` | Name of transition preset (https://vueuse.org/core/useTransition) | ## Credits - Credits to [Grzegorz Krol](https://github.com/Grzechu335) for porting this component. - Ported from [Magic UI NumberTicker](https://magicui.design/docs/components/number-ticker). URL: https://inspira-ui.com/docs/components/text-animations/radiant-text --- title: Radiant Text description: A glare effect on text. --- ```vue ``` ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code ```vue ``` ## API | Prop Name | Type | Default | Description | | -------------- | -------- | ------- | ------------------------------------- | | `duration` | `number` | `10` | Duration of the animation in seconds. | | `radiantWidth` | `number` | `100` | Width of the radiant animation. | ## Credits - Credits to [Magic UI](https://magicui.design/docs/components/animated-shiny-text) for this fantastic component. URL: https://inspira-ui.com/docs/components/text-animations/sparkles-text --- title: Sparkles Text description: A dynamic text that generates continuous sparkles with smooth transitions, perfect for highlighting text with animated stars. --- ```vue ``` ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code ```vue ``` ## API | Prop Name | Type | Default | Description | | --------------- | -------- | ---------------------------------------- | --------------------------------------------- | | `class` | `string` | `-` | The class to be applied to the sparkles text. | | `text` | `string` | `` | The text to display. | | `sparklesCount` | `number` | `10` | sparkles count that appears on the text. | | `colors` | `object` | `{first: '#A07CFE'; second: '#FE8FB5';}` | The sparkles colors. | ## Credits - Credits to [SivaReddy Uppathi](https://github.com/sivareddyuppathi) for this component. - Inspired from [Magic UI](https://magicui.design/docs/components/sparkles-text). - Credits to [M Atif](https://github.com/atif0075) for updating this component. URL: https://inspira-ui.com/docs/components/text-animations/spinning-text --- title: Spinning Text description: The Spinning Text component animates text in a circular motion with customizable speed, direction, color, and transitions for dynamic and engaging effects. --- ```vue ``` ::alert{type="warning"} This component uses the `nuxt-only` syntax with the ``. If you are not using Nuxt, you can simply remove it. :: ## Examples reverse ```vue ``` ## API | Prop Name | Type | Default | Description | | ------------ | ------------------------------------------------------- | ------- | ------------------------------------------------------- | | `duration` | `number` | `10` | The duration of the full circular rotation animation. | | `reverse` | `boolean` | `false` | Determines if the animation should rotate in reverse. | | `radius` | `number` | `5` | The radius of the circular path for the text animation. | | `transition` | `motion-v Transition` | `` | Custom transition effects for the animation. | | `variants` | `{container: motion-v Variant, item: motion-v Variant}` | `` | Variants for container and item animations. | | `class` | `string` | `""` | A custom class name for the text container. | ## Install using CLI ```vue ``` ## Component Code You can copy and paste the following code to create this component: ```vue ``` ## Credits - Credits to [Whbbit1999](https://github.com/Whbbit1999) for this component. - Ported from [Magic UI Spinning Text](https://magicui.design/docs/components/spinning-text). URL: https://inspira-ui.com/docs/components/text-animations/text-generate-effect --- title: Text Generate Effect description: A cool text effect that fades in text on page load, one by one. --- ```vue ``` ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code ```vue ``` ## Examples Two text with different delay ```vue ``` ::alert{type="warning"} This component uses the `nuxt-only` syntax with the ``. If you are not using Nuxt, you can simply remove it. :: ## API | Prop Name | Type | Default | Description | | ---------- | --------- | -------- | ---------------------------------------------------------------------- | | `words` | `string` | Required | The text to be displayed with the generating effect. | | `duration` | `number` | `0.7` | The duration of the text generation animation in seconds. | | `delay` | `number` | `0` | The delay before the text generation animation starts in milliseconds. | | `filter` | `boolean` | `true` | The blur of the text. | ## Credits - Credits to [M Atif](https://github.com/atif0075) for porting this component. - Ported from [Aceternity UI's Text Generate Effect](https://ui.aceternity.com/components/text-generate-effect). URL: https://inspira-ui.com/docs/components/text-animations/text-glitch --- title: Text Glitch description: Creates a vibrant glitch effect on text with customizable speed, shadow colors, and optional hover-triggered animation. --- ```vue ``` ## API | Prop Name | Type | Default | Description | | --------------- | --------- | ----------- | ------------------------------------------------------------- | | `text` | `string` | `""` | The text content to display with the glitch effect. | | `speed` | `number` | `0.5` | Controls the animation speed of the glitch effect in seconds. | | `enableShadows` | `boolean` | `true` | Toggles colored shadows that enhance the glitch look. | | `enableOnHover` | `boolean` | `false` | If true, glitch animation activates only on hover. | | `class` | `string` | `undefined` | Additional CSS classes for the container div. | ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code: ```vue ``` ## Features - **Stylish glitch animation**: Text appears with vibrant RGB channel shifts and clipping. - **Configurable speed**: Easily adjust animation timing via `speed` prop. - **Shadow control**: Enable or disable colored shadows for stronger glitch effect. - **Hover-triggered option**: Activate glitch only on mouse hover to reduce distraction. - **Responsive sizing**: Font size scales smoothly across screen sizes using clamp(). ## Credits - Inspired and developed using resources from following YouTube videos. - https://www.youtube.com/watch?v=7Xyg8Ja7dyY - https://www.youtube.com/watch?v=9CCkp_El1So URL: https://inspira-ui.com/docs/components/text-animations/text-highlight --- title: Text Highlight description: A text effect that fill background of a text to highlight it. --- ```vue ``` ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code ```vue ``` ## Examples With 3s delay ```vue ``` Rounded text background ```vue ``` Color from CSS variables: use the paintbrush icon in the top right corner to change the color. ```vue ``` With text color change. ```vue ``` ## API | Prop Name | Type | Default | Description | | ---------------- | -------- | --------- | -------------------------------------------------------------------------- | | `delay` | `number` | `0` | Delay before the animation starts, in `ms`. | | `duration` | `number` | `2000` | Duration of the animation, in `ms`. | | `text-end-color` | `string` | `inherit` | Color of the text at the end of the animation. Match WCAG recommendations. | ## Credits - Inspired by [Aceternity UI](https://ui.aceternity.com/components/hero-highlight) - Credits to [Nathan De Pachtere](https://nathandepachtere.com) for porting this component. URL: https://inspira-ui.com/docs/components/text-animations/text-hover-effect --- title: Text Hover Effect description: A text hover effect that animates and outlines gradient on hover, as seen on x.ai --- ```vue ``` ::alert{type="warning"} This component uses the `nuxt-only` syntax with the ``. If you are not using Nuxt, you can simply remove it. :: ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code ```vue ``` ## API | Prop Name | Type | Default | Description | | ------------- | -------- | -------- | --------------------------------------------------------- | | `text` | `string` | Required | The text to be displayed with the hover effect. | | `duration` | `number` | `200` | The duration of the mask transition animation in seconds. | | `strokeWidth` | `number` | `0.75` | The width of the text stroke. | | `opacity` | `number` | `null` | The opacity of the text. | URL: https://inspira-ui.com/docs/components/text-animations/text-reveal-card --- title: Text Reveal Card description: Mousemove effect to reveal text content at the bottom of the card. --- ```vue ``` ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code in the same folder ::code-group :CodeViewerTab{label="TextRevealCard.vue" language="vue" componentName="TextRevealCard" type="ui" id="text-reveal-card"} :CodeViewerTab{filename="TextRevealStars.vue" language="vue" componentName="TextRevealStars" type="ui" id="text-reveal-card"} :: ## API | Prop Name | Type | Description | | ---------- | -------- | ---------------------------------------------------------------- | | class | `String` | Additional classes to be added to the card. | | starsCount | `Number` | Control the number of stars that are generated | | starsClass | `String` | Additional classes to be added to the stars floating on content. | | Slot Name | Description | | ---------- | ------------------------------------------------------- | | header | `String` | | text | Display default text when the card is not hovered over. | | revealText | Text to be revealed when hovered over the card. | ## Credits - Credits to [M Atif](https://github.com/atif0075) for porting this component. - Ported from [Aceternity UI's Text Reveal Card](https://ui.aceternity.com/components/text-reveal-card). URL: https://inspira-ui.com/docs/components/text-animations/text-reveal --- title: Text Reveal description: Animate text line-by-line using GSAP's SplitText for smooth word or line entrance effects. --- ```vue ``` ## API | Prop Name | Type | Default | Description | | ---------------- | -------- | ------- | ------------------------------------------------ | | `class` | `string` | `-` | Additional classes for the inner text container. | | `containerClass` | `string` | `-` | Additional classes for the outer container. | | `duration` | `number` | `0.6` | Animation duration for line reveal. | | `delay` | `number` | `0.2` | Initial delay before animation starts. | | `stagger` | `number` | `0.1` | Animation delay between each line reveal. | ## Installation This component depends on **GSAP** and **GSAP SplitText**. ::pm-install{name="gsap"} :: ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code: ```vue ``` ## Features - **Line-by-line animation**: Automatically splits and animates lines of text. - **Staggered entry**: Smooth entrance with staggered reveal timing. - **Scoped styling**: Ensures each line is masked for clean transitions. - **Customizable timing**: Control animation duration and delay. ## Credits - Powered by [GSAP](https://gsap.com/) and [GSAP SplitText](https://gsap.com/docs/v3/Plugins/SplitText/). URL: https://inspira-ui.com/docs/components/text-animations/text-scroll-reveal --- title: Text Scroll Reveal description: A component that reveals text word by word as you scroll, with customizable text and styling. --- ```vue ``` ::alert{type="warning"} This component uses the `nuxt-only` syntax with the ``. If you are not using Nuxt, you can simply remove it. :: ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code in the same folder ::code-group :CodeViewerTab{label="TextScrollReveal.vue" language="vue" componentName="TextScrollReveal" type="ui" id="text-scroll-reveal"} :CodeViewerTab{filename="ScrollWord.vue" language="vue" componentName="ScrollWord" type="ui" id="text-scroll-reveal"} :: ## API | Prop Name | Type | Default | Description | | --------- | -------- | ------- | ------------------------------------------------------------------- | | `text` | `string` | N/A | The text content to display and reveal word by word during scroll. | | `class` | `string` | `""` | Additional CSS classes to apply to the component for customization. | ## Features - **Scroll-Activated Text Reveal**: The component reveals the provided text word by word as the user scrolls, creating an engaging visual effect. - **Customizable Text Content**: Set the `text` prop to display any text content you wish to reveal during scroll. - **Smooth Animations**: Each word's opacity transitions smoothly based on scroll position, providing a visually appealing experience. - **Styling Flexibility**: Use the `class` prop to pass additional CSS classes for custom styling. - **Reactive Design**: The component uses Vue's reactivity system to update the scroll progress and word visibility in real-time. ## Credits - Ported from [Magic UI Text Reveal](https://magicui.design/docs/components/text-reveal). URL: https://inspira-ui.com/docs/components/visualization/bending-gallery --- title: Bending Gallery description: A curved, scrollable 3D gallery with dynamic image cards and animated text rendered using WebGL and OGL. --- ```vue ``` ## API | Prop Name | Type | Default | Description | | -------------- | ----------------------------------- | --------------------- | --------------------------------------------------------------- | | `items` | `{ image: string; text: string }[]` | `[]` | Array of objects containing image URLs and accompanying text. | | `bend` | `number` | `3` | Controls the curvature of the gallery. Higher values bend more. | | `textColor` | `string` | `"#ffffff"` | Color of the text displayed below each image. | | `borderRadius` | `number` | `0.05` | Rounded corners for image cards (in UV space). | | `font` | `string` | `"bold 30px DM Sans"` | Font used for the text below each image. | ## Features - **Curved Layout**: Creates a 3D bending effect across the scrollable gallery. - **Image & Text Support**: Each item includes an image with dynamic text rendered via canvas. - **Customizable Props**: Bend amount, border radius, font, and colors are fully configurable. - **WebGL Rendering**: Utilizes [OGL](https://github.com/oframe/ogl) for GPU-accelerated visuals. - **Smooth Interactions**: Drag or scroll with momentum and responsive snapping. - **Autoloop Gallery**: Seamlessly scroll through items in an infinite loop-like experience. ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code ```vue ``` ## Credits - Inspired by [Infinite Circular Gallery from Codrops](https://tympanus.net/Tutorials/InfiniteCircularGallery/). URL: https://inspira-ui.com/docs/components/visualization/carousal-3d --- title: 3D Carousel description: A dynamic and interactive 3D carousel component using Three.js and Motion-V, allowing smooth infinite rotation and user-controlled interactions. --- ```vue ``` ## API | Prop Name | Type | Default | Description | | ---------------- | ----------- | ------- | ----------------------------------------------------------- | | `items` | `unknown[]` | `[]` | List of images or elements to be displayed in the carousel. | | `class` | `string` | `""` | Additional CSS classes for styling the carousel overlay. | | `containerClass` | `string` | `""` | CSS classes for styling the carousel container. | | `width` | `number` | `450` | Width of individual carousel items. | | `height` | `number` | `600` | Height of individual carousel items. | ## Component Code You can copy and paste the following code to create this component: ::code-group ::CodeViewerTab{label="Carousel3D.vue" language="vue" componentName="Carousel3D" type="ui" id="carousel-3d"} :: :: ## Features - **3D Rotating Carousel**: Displays a rotating 3D carousel using Three.js. - **Smooth Infinite Rotation**: The carousel continuously rotates smoothly. - **User Interaction Support**: Supports mouse and touch interactions to manually rotate the carousel. - **Fully Responsive**: Adapts to different screen sizes dynamically. - **Performance Optimized**: Utilizes Motion-V for smooth animations and easing functions. - **Dynamic Item Rendering**: Accepts an array of items to render in the carousel dynamically. - **Dark Mode Support**: Adaptable to dark and light themes for better UI consistency. ## Credits - Built using Three.js for 3D rendering. - Utilizes Motion-V for seamless animations. - Thanks [@safakdinc](https://github.com/safakdinc) for sharing this component. URL: https://inspira-ui.com/docs/components/visualization/file-tree --- title: File Tree description: A component used to showcase the folder and file structure of a directory. --- ```vue ``` ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code in the same folder ::code-group :CodeViewerTab{label="Tree.vue" language="vue" componentName="Tree" type="ui" id="file-tree"} :CodeViewerTab{label="Folder.vue" language="vue" componentName="Folder" type="ui" id="file-tree"} :CodeViewerTab{label="File.vue" language="vue" componentName="File" type="ui" id="file-tree"} :CodeViewerTab{label="TreeIndicator.vue" language="vue" componentName="TreeIndicator" type="ui" id="file-tree"} ```ts [index.ts] import type { HTMLAttributes } from "vue"; export interface TreeProps { class?: HTMLAttributes["class"]; initialSelectedId: string; indicator?: boolean; elements: TreeViewElement[]; initialExpandedItems: string[]; openIcon?: string; closeIcon?: string; fileIcon?: string; direction?: "rtl" | "ltr"; } export interface TreeContextProps { selectedId: Ref; expandedItems: Ref; indicator: boolean; openIcon: string; closeIcon: string; fileIcon: string; direction: "rtl" | "ltr"; handleExpand: (id: string) => void; selectItem: (id: string) => void; setExpandedItems: (items: string[] | undefined) => void; } export interface TreeViewElement { id: string; name: string; isSelectable?: boolean; children?: TreeViewElement[]; } export interface BaseItemProps { class?: HTMLAttributes["class"]; id: string; name: string; isSelectable?: boolean; isSelect?: boolean; } export interface FolderProps extends BaseItemProps {} export interface FileProps extends BaseItemProps {} export const TREE_CONTEXT_SYMBOL = Symbol("TREE_CONTEXT_SYMBOL"); export { default as Tree } from "./Tree.vue"; export { default as Folder } from "./Folder.vue"; export { default as File } from "./File.vue"; ``` :: ## API ::steps ### `Tree` The `Tree` component serves as a container for displaying a hierarchical file/folder structure. #### Props | Prop Name | Type | Default | Description | | ---------------------- | ------------------- | ---------------------- | -------------------------------------------------- | | `class` | `string` | - | Additional classes for styling the tree container. | | `initialSelectedId` | `string` | - | ID of the initially selected item. | | `indicator` | `boolean` | `true` | Whether to show the tree indicator line. | | `elements` | `TreeViewElement[]` | - | Array of tree elements to display. | | `initialExpandedItems` | `string[]` | - | Array of IDs of initially expanded folders. | | `openIcon` | `string` | `"lucide:folder-open"` | Icon to show for open folders. | | `closeIcon` | `string` | `"lucide:folder"` | Icon to show for closed folders. | | `fileIcon` | `string` | `"lucide:file"` | Icon to show for files. | | `direction` | `"rtl" \| "ltr"` | `"ltr"` | Text direction of the tree. | #### Usage ```vue [MyComponent.vue] ``` ### `Folder` and `File` The `Folder` and `File` components represent folders and files in the file tree. Folders can contain other `Folder` and `File` components. #### Props | Prop Name | Type | Default | Description | | -------------- | --------- | ------- | --------------------------------------- | | `class` | `string` | - | Additional classes for custom styling. | | `id` | `string` | - | Unique identifier for the item. | | `name` | `string` | - | Display name of the folder/file. | | `isSelectable` | `boolean` | `true` | Whether the item can be selected. | | `isSelect` | `boolean` | `false` | Whether the item is currently selected. | #### Usage ```vue [MyComponent.vue] ``` :: ## Credits - Inspired by [Magic UI](https://magicui.design/docs/components/file-tree). - Credit to [kalix127](https://github.com/kalix127) for porting this component. URL: https://inspira-ui.com/docs/components/visualization/github-globe --- title: Github Globe description: A 3D interactive globe visualization with customizable arcs, points, and animation options inspired from Github. --- ```vue ``` ::alert{type="info"} **Note:** This component uses Three.js & requires `three`, `three-globe` & `postprocessing` npm package as a dependency. :: ::alert{type="warning"} **For Nuxt users**: Use `` tag to wrap this component to avoid `window is not defined` error. :: ## Install using CLI ```vue ``` ## Install Manually ::steps{level=4} #### Install the dependencies ::code-group ```bash [npm] npm install three postprocessing three-globe npm install -D @types/three ``` ```bash [pnpm] pnpm install three postprocessing three-globe pnpm install -D @types/three ``` ```bash [bun] bun add three postprocessing three-globe bun add -d @types/three ``` ```bash [yarn] yarn add three postprocessing three-globe yarn add --dev @types/three ``` :: Copy and paste the following code ```vue ``` #### Download GeoJSON file Download a GeoJSON file containing the globe's geographical data from [GeoJSON Maps](https://geojson-maps.kyd.au/) by customizing the continents and detail level. Save the downloaded file as `globe.json` in the same folder as your component. :: ## API | Prop Name | Type | Default | Description | | ------------- | ------------ | ------- | --------------------------------------------------------------------------------------------------- | | `globeConfig` | `object` | `{}` | Configuration options for the globe, including colors, atmosphere, rotation speed, and lighting. | | `data` | `Position[]` | `[]` | Array of positions representing arcs and points on the globe, with latitude, longitude, color, etc. | | `class` | `string` | `""` | Additional CSS classes for custom styling. | ### `globeConfig` Properties | Property | Type | Default | Description | | -------------------- | --------- | ----------------------- | -------------------------------------------------------- | | `pointSize` | `number` | `1` | Size of individual points on the globe. | | `globeColor` | `string` | `"#1d072e"` | Color of the globe surface. | | `showAtmosphere` | `boolean` | `true` | Whether to display atmosphere around the globe. | | `atmosphereColor` | `string` | `"#ffffff"` | Color of the atmosphere around the globe. | | `atmosphereAltitude` | `number` | `0.1` | Altitude of the atmosphere layer. | | `emissive` | `string` | `"#000000"` | Emissive color for the globe material. | | `emissiveIntensity` | `number` | `0.1` | Intensity of the emissive color. | | `shininess` | `number` | `0.9` | Shininess of the globe material. | | `polygonColor` | `string` | `rgba(255,255,255,0.7)` | Color of polygon boundaries on the globe. | | `arcTime` | `number` | `2000` | Duration for arcs animation. | | `arcLength` | `number` | `0.9` | Length of arcs on the globe. | | `rings` | `number` | `1` | Number of rings to display per point. | | `maxRings` | `number` | `3` | Maximum rings around each point. | | `initialPosition` | `object` | `{ lat: 0, lng: 0 }` | Initial latitude and longitude for the globe's position. | | `autoRotate` | `boolean` | `false` | Automatically rotate the globe. | | `autoRotateSpeed` | `number` | `0.8` | Speed of auto-rotation when enabled. | ### `data` Structure (Position) | Field | Type | Description | | ---------- | -------- | ----------------------------------------------- | | `order` | `number` | Order of the point or arc for sequencing. | | `startLat` | `number` | Starting latitude for an arc. | | `startLng` | `number` | Starting longitude for an arc. | | `endLat` | `number` | Ending latitude for an arc. | | `endLng` | `number` | Ending longitude for an arc. | | `arcAlt` | `number` | Altitude of the arc (determines arc height). | | `color` | `string` | Color of the arc or point in hex or RGB format. | ## Features - **3D Interactive Globe**: A Three.js-based globe with interactive controls and orbit support. - **Customizable Globe & Atmosphere**: Allows configuration of globe color, atmosphere visibility, and colors. - **Arcs & Points Visualization**: Display arcs and points on the globe, simulating connections and locations. - **Auto-Rotate and Zoom**: Supports auto-rotation, zoom, and customizable controls for a dynamic experience. - **Responsive Design**: Adapts to container size and maintains performance with WebGL rendering. ## Credits - Built with Three.js and Three Globe libraries, designed for global data visualizations and dynamic effects. - Ported from [Aceternity UI](https://ui.aceternity.com/components/github-globe). URL: https://inspira-ui.com/docs/components/visualization/globe --- title: Globe description: An interactive rotating globe component. --- ```vue ``` ::alert{type="info"} **Note:** This component uses `cobe` and `vue-use-spring` as a dependency. :: ## Install using CLI ```vue ``` ## Install Manually ::steps{level=4} #### Install the dependencies ::code-group ```bash [npm] npm install cobe vue-use-spring ``` ```bash [pnpm] pnpm install cobe vue-use-spring ``` ```bash [bun] bun add cobe vue-use-spring ``` ```bash [yarn] yarn add cobe vue-use-spring ``` :: Copy and paste the following code ```vue ``` :: ## API | Prop Name | Type | Default | Description | | ----------- | ------------- | ------- | ----------------------------------------------------------------------------------------------------------- | | `class` | `string` | `""` | Additional CSS classes for custom styling. | | `config` | `COBEOptions` | N/A | Configuration object for the globe, following **[COBE]**(https://cobe.vercel.app/docs/api) library options. | | `mass` | `number` | `1` | Mass parameter for the spring animation controlling rotation inertia. | | `tension` | `number` | `280` | Tension parameter for the spring animation, affecting responsiveness. | | `friction` | `number` | `100` | Friction parameter for the spring animation, affecting damping. | | `precision` | `number` | `0.001` | Precision parameter for the spring animation calculations. | ## Features - **Interactive 3D Globe**: Provides an interactive 3D globe visualization that users can rotate with mouse or touch interactions. - **Customizable Markers**: Display markers on the globe at specified locations with customizable sizes. - **Smooth Animations**: Utilizes physics-based spring animations for smooth and responsive globe rotations. - **Configurable Appearance**: Customize the globe's appearance and behavior through the `config` prop using COBE library options. - **Responsive Design**: Automatically adjusts to different screen sizes and resolutions. ## Credits - Built using the [cobe](https://github.com/shuding/cobe) library for WebGL globe visualization. - Ported from [Magic UI](https://magicui.design/docs/components/globe). URL: https://inspira-ui.com/docs/components/visualization/icon-cloud --- title: Icon Cloud description: An interactive 3D tag cloud component --- ```vue ``` ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code in the same folder ::code-group :CodeViewerTab{label="IconCloud.vue" language="vue" componentName="IconCloud" type="ui" id="icon-cloud"} :CodeViewerTab{filename="index.ts" language="typescript" componentName="index" type="ui" id="icon-cloud" extension="ts"} :: ## API | Prop Name | Type | Default | Description | | --------- | -------- | ------- | --------------------------------------------- | | `class` | `string` | - | Additional classes for styling the component. | | `images` | `array` | `[]` | Array of image URLs to render in the cloud | ## Credits - Inspired by [MagicUI](https://magicui.design/docs/components/icon-cloud). - Credits to [kalix127](https://github.com/kalix127) for porting this component. URL: https://inspira-ui.com/docs/components/visualization/infinite-grid --- title: Infinite Grid description: A high-performance, interactive 3D infinite grid component built with OGL as seen on phantom.land --- ```vue ``` ::alert{type="info"} **Note:** This component uses OGL & requires `ogl` and `gsap` as dependencies. :: ## API | Prop Name | Type | Default | Description | | ---------- | ------------------------------ | ------- | ----------------------------------------------------------------------------- | | `cardData` | `CardData[]` | `[]` | Data for every tile shown in the grid. **Required**. | | `options` | `Partial` | `{}` | Optional overrides for layout, camera, and post-processing (see table below). | ### `InfiniteGridOptions` | Option | Type | Default | Description | | --------------------------------------- | --------- | ------- | --------------------------------------------------- | | `gridCols` | `number` | `4` | Grid Columns . | | `gridRows` | `number` | `4` | Grid Rows . | | `gridGap` | `number` | `0` | Gap between squares. | | `tileSize` | `number` | `2.4` | Tile size (OGL units). | | `baseCameraZ` | `number` | `10` | Starting Z-distance of the camera. | | `enablePostProcessing` | `boolean` | `true` | Toggle the post-processing pipeline. | | `postProcessParams.distortionIntensity` | `number` | `-0.2` | Barrel / pincushion distortion strength (0 = none). | | `postProcessParams.vignetteOffset` | `number` | `0.0` | Vignette offset; higher ⇒ smaller clear area. | | `postProcessParams.vignetteDarkness` | `number` | `0.0` | Vignette darkness; higher ⇒ darker edges. | --- ### `CardData` | Field | Type | Required | Description | | ------------- | ---------- | -------- | --------------------------------------------- | | `title` | `string` | ✓ | Main heading text. | | `badge` | `string` | ✓ | Badge label (render logic can be customised). | | `description` | `string` | – | Longer body text. | | `tags` | `string[]` | ✓ | Tag pills rendered at the bottom. | | `date` | `string` | ✓ | Date string shown bottom-right. | | `image` | `string` | – | URL for the tile's background image. | --- ## Emits | Event Name | Payload | Description | | -------------- | ----------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | | `tileClicked` | `{ card: CardData, index: number }` | Fired whenever a tile is clicked/tapped. The payload contains the clicked `CardData` object and its zero-based `index`. | | `onTileLoaded` | - | Fired when all the images are loaded inside the tile. | ## Install using CLI ```vue ``` ## Install Manually #### Install the dependencies ::code-group ```bash [npm] npm install ogl gsap ``` ```bash [pnpm] pnpm install ogl gsap ``` ```bash [bun] bun add ogl gsap ``` ```bash [yarn] yarn add ogl gsap ``` :: #### Copy and paste the following code in the same folder ::code-group :CodeViewerTab{label="InfiniteGrid.vue" language="vue" componentName="InfiniteGrid" type="ui" id="infinite-grid"} :CodeViewerTab{filename="InfiniteGridClass.ts" language="typescript" componentName="InfiniteGridClass" type="ui" id="infinite-grid" extension="ts"} :CodeViewerTab{filename="DisposalManager.ts" language="typescript" componentName="DisposalManager" type="ui" id="infinite-grid" extension="ts"} :CodeViewerTab{filename="EventHandler.ts" language="typescript" componentName="EventHandler" type="ui" id="infinite-grid" extension="ts"} :CodeViewerTab{filename="GridManager.ts" language="typescript" componentName="GridManager" type="ui" id="infinite-grid" extension="ts"} :CodeViewerTab{filename="PostProcessShader.ts" language="typescript" componentName="PostProcessShader" type="ui" id="infinite-grid" extension="ts"} :CodeViewerTab{filename="createTexture.ts" language="typescript" componentName="createTexture" type="ui" id="infinite-grid" extension="ts"} :CodeViewerTab{filename="shaders.ts" language="typescript" componentName="shaders" type="ui" id="infinite-grid" extension="ts"} :CodeViewerTab{filename="types.ts" language="typescript" componentName="types" type="ui" id="infinite-grid" extension="ts"} :: ## Credits - Inspired from [Phantom Land](https://phantom.land) - Special thanks to [Safak Dinc](https://github.com/safakdinc) for the idea and for granting permission to include it here. You can find the original repository at [infinite-grid](https://github.com/safakdinc/infinite-grid). Your contribution is greatly appreciated! - Credits to [kalix127](https://github.com/kalix127) for porting this component. URL: https://inspira-ui.com/docs/components/visualization/light-speed --- title: Light Speed description: A highly customizable 3D highway speed visual effect built with Three.js, featuring animated road, cars, lights, and distortion effects for immersive motion simulation. --- ```vue ``` ## API | Prop Name | Type | Default | Description | | --------------- | ---------------------------- | -------------------- | ------------------------------------------------------------------------------ | | `effectOptions` | `Partial` | See `defaultOptions` | Configuration object to customize road, lights, distortion, speed, and colors. | ## Preset Descriptions - **Preset One**: Deep red hyperspeed lights — uses `deepDistortion`, aggressive burst effect. - **Preset Two**: Subtle zigzag distortion — `turbulentDistortion` with classic highway streaks. - **Preset Three**: Wider roads with center island — `LongRaceDistortion` for long horizontal waves. - **Preset Four**: Smooth xy wobble effect — good for elegant or luxury brand use. - **Preset Five**: Mountain-like terrain distortion with glowing ambient vibes. - **Preset Six**: Minimal streaks — soft turbulence for background moods. ## Installation Requires `three` and `postprocessing` libraries for advanced rendering effects. ::pm-install{name="three postprocessing"} :: ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code: ::code-group ::CodeViewerTab{filename="LightSpeed.vue" language="vue" componentName="LightSpeed" type="ui" id="light-speed"} :: ::CodeViewerTab{filename="LightSpeedApp.ts" language="typescript" icon="vscode-icons:file-type-typescript" componentName="LightSpeedApp" type="ui" id="light-speed" extension="ts"} :: ::CodeViewerTab{filename="presets.ts" language="typescript" icon="vscode-icons:file-type-typescript" componentName="presets" type="ui" id="light-speed" extension="ts"} :: ::CodeViewerTab{filename="shaders.ts" language="typescript" icon="vscode-icons:file-type-typescript" componentName="shaders" type="ui" id="light-speed" extension="ts"} :: :: ## Features - **Realistic highway simulation**: 3D road with lanes, shoulder, and island rendered with custom shaders. - **Dynamic car lights**: Animated left and right car light strips with fading and color variations. - **Multiple distortion presets**: Various distortion effects to simulate road vibrations and speed sensations. - **Camera FOV and speed control**: Smooth zoom and speed-up interactions on mouse/touch events. - **Postprocessing effects**: Bloom and SMAA anti-aliasing for high-quality visuals. - **Highly customizable**: Configure lanes, road width, colors, speeds, light properties, and more via options. - **Responsive design**: Auto-resizes on window change for consistent rendering quality. ## Tips - Combine with dark background & full viewport for immersive results. - Add a CTA or logo overlay with fixed position elements to center attention. ## Credits - Ported to Vue from [Codrops Article](https://tympanus.net/codrops/2019/11/13/high-speed-light-trails-in-three-js/) URL: https://inspira-ui.com/docs/components/visualization/liquid-glass --- title: Liquid Glass Effect description: A visually striking glassmorphism effect using SVG displacement filters similar to Apple Liquid Glass. --- ```vue ``` ## API | Prop Name | Type | Default | Description | | ---------------- | ------------------- | -------------- | --------------------------------------------------------------------------------------- | | `radius` | `number` | `16` | Border radius for the glass container corners (in pixels). | | `border` | `number` | `0.07` | Relative border thickness affecting displacement filter inner margin. | | `lightness` | `number` | `50` | Lightness (0-100) of the overlay color in HSL scale. | | `blend` | `string` | `"difference"` | CSS blend mode used between red and blue displacement layers for the distortion effect. | | `xChannel` | `"R" \| "G" \| "B"` | `"R"` | Channel from displacement image to use for horizontal displacement. | | `yChannel` | `"R" \| "G" \| "B"` | `"B"` | Channel from displacement image to use for vertical displacement. | | `alpha` | `number` | `0.93` | Alpha transparency of the overlay color (0-1). | | `blur` | `number` | `11` | Gaussian blur radius applied to the overlay. | | `rOffset` | `number` | `0` | Additional scale offset for red displacement map. | | `gOffset` | `number` | `10` | Additional scale offset for green displacement map. | | `bOffset` | `number` | `20` | Additional scale offset for blue displacement map. | | `scale` | `number` | `-180` | Base scale factor for displacement effects, combined with individual channel offsets. | | `frost` | `number` | `0.05` | Opacity factor controlling the frosted glass background overlay strength. | | `class` | `string` | `""` | Additional CSS classes applied to the inner slot container wrapping content. | | `containerClass` | `string` | `""` | Additional CSS classes applied to the outer container div. | ## Installation ::alert{type="warning"} This component uses SVG filters, for backdrop blur. These are not supported in Safari and have very limited support in Firefox. It is recommended to use this component when you are targeting Chromium based browsers, and use a fallback component in case user is on Safari or Firefox. For example, Inspira UI landing page, uses Liquid Glass component on Chromium based browsers but fallback to Frosted Glass effect on Safari and Mozilla. :: ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code: ::code-group ::CodeViewerTab{filename="LiquidGlass.vue" language="vue" componentName="LiquidGlass" type="ui" id="liquid-glass"} :: :: ## Features - **Customizable glass effect**: Control blur, displacement, color channels, and blend modes for a unique glass morphism style. - **Responsive SVG displacement filter**: Dynamically adjusts to container size changes using ResizeObserver. - **Multi-channel displacement**: Applies independent displacement maps for red, green, and blue channels for rich distortion. - **Backdrop-filter integration**: Uses CSS backdrop-filter for real-time background blurring with filter fallback. - **Scoped styling**: Encapsulated styles prevent bleed and ensure smooth border-radius and shadows. - **Flexible content wrapper**: Slot container for any nested content with custom class support. ## Credits - Inspired by Apple Liquid Glass. URL: https://inspira-ui.com/docs/components/visualization/liquid-logo --- title: Liquid Logo description: An advanced WebGL-based component that applies a dynamic, liquid effect to logos or images using custom shaders. --- ```vue ``` ## API | Prop Name | Type | Default | Description | | -------------- | -------- | ------- | -------------------------------------------- | | `class` | `string` | `""` | Additional CSS classes for custom styling. | | `imageUrl` | `string` | `""` | URL of the image to apply the liquid effect. | | `patternScale` | `number` | `2` | Scale of the distortion pattern. | | `refraction` | `number` | `0.015` | Amount of refraction applied to the image. | | `edge` | `number` | `0.4` | Sharpness of the edge effect. | | `patternBlur` | `number` | `0.005` | Blur effect applied to the pattern. | | `liquid` | `number` | `0.07` | Intensity of the liquid animation. | | `speed` | `number` | `0.3` | Animation speed of the liquid effect. | ## Component Code You can copy and paste the following code to create this component: ::code-group ::CodeViewerTab{label="LiquidLogo.vue" language="vue" componentName="LiquidLogo" type="ui" id="liquid-logo"} :: ::CodeViewerTab{label="parseLogoImage.ts" language="typescript" componentName="parseLogoImage" type="ui" id="liquid-logo" extension="ts"} :: ::CodeViewerTab{label="shader.ts" language="typescript" componentName="shader" type="ui" id="liquid-logo" extension="ts"} :: :: ## Features - **Dynamic Liquid Effect**: Transforms logos or images with a fluid, liquid-like motion. - **Custom Shader Utilization**: Built with WebGL2 and GLSL shaders for real-time rendering. - **Interactive Animations**: Smooth and configurable animation effects. - **Responsive Scaling**: Automatically adjusts to different screen sizes and resolutions. - **Configurable Parameters**: Offers a wide range of props to control effects like refraction, speed, and edge sharpness. ## Credits - Inspired by the Apple Fluid Motion design. - Ported and enhaced from [Paper Design Concept](https://github.com/paper-design/liquid-logo). URL: https://inspira-ui.com/docs/components/visualization/logo-cloud --- title: Animated Logo Cloud description: Animated company cloud logs. Usually we can use to show company logos. --- ```vue ``` ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code in the same folder ::code-group :CodeViewerTab{label="AnimatedLogoCloud.vue" language="vue" componentName="AnimatedLogoCloud" type="ui" id="logo-cloud"} :CodeViewerTab{label="IconLogoCloud.vue" language="vue" componentName="IconLogoCloud" type="ui" id="logo-cloud"} :CodeViewerTab{label="StaticLogoCloud.vue" language="vue" componentName="StaticLogoCloud" type="ui" id="logo-cloud"} :CodeViewerTab{filename="index.ts" language="typescript" componentName="index" type="ui" id="logo-cloud" extension="ts"} :: ## Examples ### Animated logs Animated company logos. ```vue ``` ### Icon Logo Company logo icons ```vue ``` ## API | Prop Name | Type | Default | Description | | --------- | -------- | --------------------------- | -------------------------------------------------------------- | | `class` | `string` | `-` | The delay in milliseconds before adding each item to the list. | | `title` | `string` | `Trusted by Companies like` | Title of animated logs. | | `logos` | `[]` | `[{name: "", path: ""}]` | Array of items(logos) with name & path fields. | ## Credits - Credits to [SivaReddy Uppathi](https://github.com/sivareddyuppathi) for this component. URL: https://inspira-ui.com/docs/components/visualization/logo-origami --- title: Logo Origami description: Animated flipping logo with origami effect. --- ```vue ``` ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code in the same folder ::code-group :CodeViewerTab{label="LogoOrigami.vue" language="vue" componentName="LogoOrigami" type="ui" id="logo-origami"} :CodeViewerTab{filename="LogoOrigamiItem.vue" language="vue" componentName="LogoOrigamiItem" type="ui" id="logo-origami"} :: ## API | Prop Name | Type | Default | Description | | ---------- | -------- | ------- | ------------------------------------------ | | `class` | `string` | `""` | Additional CSS classes for custom styling. | | `duration` | `number` | `1.5` | Duration of the flip animation in seconds. | | `delay` | `number` | `2.5` | Delay between flip animations in seconds. | ## Features - **Origami Flip Animation**: Animates flipping between multiple child components with an origami-style effect. - **Customizable Timing**: Adjust the `duration` and `delay` props to control the animation speed and interval. - **Slot-Based Content**: Accepts multiple child components or content via default slots. - **Responsive Design**: Designed to adapt to various screen sizes and devices. - **Easy Integration**: Simple to include in your Vue projects with minimal setup. ## Credits - Inspired by origami animations and flip effects at [hover.dev](www.hover.dev/components/other#logo-origami) URL: https://inspira-ui.com/docs/components/visualization/orbit --- title: Orbit description: A component that animates content in a circular orbit, with customizable duration, delay, and radius. It also offers an optional orbit path display. --- ```vue ``` ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code in the same folder ::code-group :CodeViewerTab{label="Orbit.vue" language="vue" componentName="Orbit" type="ui" id="orbit"} :CodeViewerTab{filename="index.ts" language="typescript" componentName="index" type="ui" id="orbit" extension="ts"} :: ## Examples Synchronized orbit ```vue ``` ## API | Prop Name | Type | Default | Description | | ----------- | --------------------- | -------- | --------------------------------------------------------------------- | | `direction` | `normal` \| `reverse` | `normal` | The direction of the orbit. You can use the constant ORBIT_DIRECTION. | | `duration` | `?number` | `20` | The duration of the orbit animation in seconds. | | `delay` | `?number` | `10` | Delay in seconds before the animation starts. | | `radius` | `?number` | `50` | Radius of the orbit path in pixels. | | `path` | `?boolean` | `false` | Displays a circle path for the orbit if `true`. | ## Features - **Circular Orbit Animation**: The component animates its content in a smooth circular orbit around the center point. - **Customizable Animation**: The orbit’s duration, delay, and radius are fully adjustable, providing flexibility in animation behavior. - **Optional Orbit Path**: An optional visual representation of the orbit path can be toggled using the `path` prop. - **Reversibility**: The orbit direction can be `reverse` by setting the `direction` prop. - **Responsive and Efficient**: The component handles different container sizes and uses Vue’s reactivity to ensure efficient animation. ## Credits - Inspired by [Magic UI](https://magicui.design/docs/components/orbiting-circles). - Credits to [Nathan De Pachtere](https://nathandepachtere.com/) for updating this component. URL: https://inspira-ui.com/docs/components/visualization/spline --- title: Spline description: A Vue wrapper component for the Spline 3D tool, providing events and auto-resizing. --- ```vue ``` ## API | Prop Name | Type | Default | Description | | ---------------- | ---------- | ----------- | ------------------------------------------------------------- | | `scene` | `string` | — | The URL or path to the Spline scene file. **Required**. | | `onLoad` | `Function` | `undefined` | Callback that fires when the Spline scene loads successfully. | | `renderOnDemand` | `boolean` | `true` | Enables or disables Spline's render-on-demand optimization. | | `style` | `object` | `{}` | Custom CSS style applied to the container of the canvas. | **Emits** | Event Name | Payload | Description | | -------------------- | ------- | ------------------------------------------------------------- | | `error` | `Error` | Emits if there's an error while loading the Spline scene. | | `spline-mouse-down` | `any` | Emits when a mouseDown event is detected in the Spline scene. | | `spline-mouse-up` | `any` | Emits when a mouseUp event is detected in the Spline scene. | | `spline-mouse-hover` | `any` | Emits when the mouseHover event is triggered. | | `spline-key-down` | `any` | Emits on keyDown within the Spline scene. | | `spline-key-up` | `any` | Emits on keyUp within the Spline scene. | | `spline-start` | `any` | Emits when the Spline scene starts. | | `spline-look-at` | `any` | Emits when a lookAt event occurs. | | `spline-follow` | `any` | Emits when a follow event occurs. | | `spline-scroll` | `any` | Emits on scroll interactions. | ::alert{type="info"} **Note:** This component uses Spline & requires `@splinetool/runtime` npm package as a dependency. :: ## Install using CLI ```vue ``` ## Install Manually ### Install the dependencies ::code-group ```bash [npm] npm install @splinetool/runtime ``` ```bash [pnpm] pnpm install @splinetool/runtime ``` ```bash [bun] bun add @splinetool/runtime ``` ```bash [yarn] yarn add @splinetool/runtime ``` :: ### Component Code You can copy and paste the following code to create this component: ::code-group ::CodeViewerTab{label="Spline.vue" language="vue" componentName="Spline" type="ui" id="spline"} :: ::CodeViewerTab{label="ParentSize.vue" language="vue" componentName="ParentSize" type="ui" id="spline"} :: :: ## Features - **Responsive Canvas**: Uses a `ParentSize` wrapper to adjust to the parent container size. - **Event Bindings**: Exposes Spline’s mouse, keyboard, and scrolling events via Vue emits. - **Render-On-Demand**: Optionally only re-renders when necessary, optimizing performance. - **Easy Integration**: Load a Spline 3D scene by simply passing the `scene` prop. - **Cleanup & Disposal**: Manages resource disposal on unmount to avoid memory leaks. ## Credits - Utilizes Spline’s runtime behind the scenes. - Inspired by various 3D web experiences using Spline. URL: https://inspira-ui.com/docs/components/visualization/world-map --- title: World Map description: Displays a customizable world map with animated arcs and pulse effects for geographical points. --- ```vue ``` ## API | Prop Name | Type | Default | Description | | ------------ | -------------------------------------------------------------------------------------------------------------------- | ----------- | --------------------------------------------------------------------------------------- | | `dots` | `Array<{ start: { lat: number; lng: number; label?: string }, end: { lat: number; lng: number; label?: string } }> ` | `[]` | Array of dot objects, each containing a start and end coordinate (latitude, longitude). | | `class` | `string` | `""` | Additional CSS classes for custom styling. | | `lineColor` | `string` | `"#0EA5E9"` | Color of the arcs and dot borders. | | `mapColor` | `string` | — | Main color of the dotted map. (**Required**) | | `mapBgColor` | `string` | — | Background color of the map. (**Required**) | ::alert{type="info"} **Note:** This component uses Spline & requires `dotted-map` npm package as a dependency. :: ## Install using CLI ```vue ``` ## Install Manually ### Install the dependencies ::code-group ```bash [npm] npm install dotted-map ``` ```bash [pnpm] pnpm install dotted-map ``` ```bash [bun] bun add dotted-map ``` ```bash [yarn] yarn add dotted-map ``` :: ## Component Code You can copy and paste the following code to create this component: ::code-group ::CodeViewerTab{label="WorldMap.vue" language="vue" componentName="WorldMap" type="ui" id="world-map"} :: :: ## Features - **Animated Arcs**: Smooth arcs between two geographical points using an SVG `path`. - **Dotted Background**: Renders a dotted map using the DottedMap library. - **Pulsing Markers**: Each point animates with expanding circles to highlight the location. - **Dynamic Projection**: Projects latitude/longitude to an 800x400 coordinate plane. - **Customizable Colors**: Control lineColor, mapColor, and mapBgColor. ## Credits - Ported from (World Map by Aceternity UI)[https://ui.aceternity.com/components/world-map]. URL: https://inspira-ui.com/docs/blocks/index --- title: Block Index description: List of all the blocks provided by Inspira UI. navigation: false --- ## All Blocks ::ComponentIndex{path="blocks"} :: URL: https://inspira-ui.com/docs/blocks/miscellaneous/hero --- title: Hero description: Elevate website experience with unique hero blocks. --- ### Hero Section 1 ```vue ``` #### Components used: - [Falling Stars Background](https://inspira-ui.com/docs/components/backgrounds/falling-stars) - [Blur Reveal](https://inspira-ui.com/docs/components/text-animations/blur-reveal) - [Flip Words](https://inspira-ui.com/docs/components/text-animations/flip-words) - [Border Beam](https://inspira-ui.com/docs/components/special-effects/border-beam) ### Hero Section 2 ```vue ``` #### Components used: - [Vortex Background](https://inspira-ui.com/docs/components/backgrounds/vortex) - [Animated Tooltip](https://inspira-ui.com/docs/components/miscellaneous/animated-tooltip) - [Text Highlight](https://inspira-ui.com/docs/components/text-animations/text-highlight) - [3D Card](https://inspira-ui.com/docs/components/cards/3d-card) URL: https://inspira-ui.com/docs/blocks/miscellaneous/testimonials --- title: Testimonials description: Show testimonials in style --- ### With skewed marquee ```vue ``` ### With linear marquee ```vue ``` #### Components used - [Marquee & Review](https://inspira-ui.com/docs/components/miscellaneous/marquee) component. URL: https://inspira-ui.com/docs/zh-cn/index --- title: 首页 description: Built beautiful websites using Nuxt & Vue icon: "lucide:home" --- # 欢迎来到 Inspira UI 使用 Nuxt 和 Vue 构建漂亮的网站。 --- Inspira UI 是由 [TailwindCSS](https://tailwindcss.com/), [motion-v](https://motion.dev/docs/vue), [gsap](https://gsap.com/) 和 [threejs](https://threejs.org/) 提供支持的可重复使用动画组件的集合,旨在帮助您更快、更好地交付。 无论您是开始一个新项目还是完善当前项目,这里都是您的起点。 ## 快速链接 ::card-group ::card{ icon="lucide:rocket" title="快速开始" description="通过安装、设置和使用指南开始您的旅程。" to="/getting-started"} :: ::card{ icon="lucide:play" title="安装" description="探索安装 Inspira UI 的不同方法——通过 CLI、手动导入或复制粘贴。" to="/getting-started/installation"} :: ::card{ icon="lucide:box" title="组件" description="浏览完整的组件列表,每个组件都有清晰的文档和漂亮的预览。" to="/components"} :: ::card{ icon="lucide:blocks" title="代码块" description="发掘现成的布局块,您可以混合搭配以构建完整的部分和页面。" to="/blocks"} :: :: ## 加入社区 我们携手共建!欢迎来打个招呼、分享反馈或贡献力量! - [**Discord**](https://discord.gg/Xbh5DwJRc9) – 在社区中交流并获得帮助 - [**X (Formely Twitter)**](https://x.com/rahulv_dev) – 关注最新动态并抢先体验 - [**Bluesky**](http://bsky.app/profile/inspira-ui.com) – 独立和另类网络对话 - [**GitHub**](https://github.com/unovue/inspira-ui) – 收藏我们仓库以支持我们! ★ ## 支持我们 [**成为赞助商**](https://github.com/sponsors/rahul-vashishtha),帮助我们成长并保持 Inspira UI 蓬勃发展💜。 ## Repo Stats ![Repo Stats](https://repobeats.axiom.co/api/embed/da99e5e9c8ddaaff68b7f57b56ae21d5e0ea2ed2.svg "Repobeats analytics image") ## Thanks to all the contributors 🙏 [![Contributors](https://contrib.rocks/image?repo=unovue/inspira-ui)](https://github.com/unovue/inspira-ui/graphs/contributors) --- 由 [Rahul Vashishtha](https://rahulv.dev) 和 Vue 社区用制作♥。 URL: https://inspira-ui.com/docs/zh-cn/getting-started/Introduction --- title: 简介 description: 由shadcn-vue、motion-v和TailwindCSS构建的可复用组件 icon: "lucide:info" --- 欢迎来到 [**Inspira UI**](https://inspira-ui.com),一个社区驱动的 [Vue](https://vuejs.org) 项目! 这个集合提供了精美的设计,可复用的组件,从 [Aceternity UI](https://ui.aceternity.com) 和 [Magic UI](https://magicui.design) 的惊人工作中获得灵感。虽然我们没有正式隶属于这些项目,但我们已经获得了 `Aceternity UI` 创建者的许可,可以将这些奇妙的设计改编为 `Vue` 生态系统。此外,`Inspira UI` 包括由我们开发和社区贡献的自定义组件。 ### 关于 Inspira UI Inspira UI**不是**一个传统的组件库。相反,它是一个精心策划的优雅组件集合,您可以轻松地将其集成到应用程序中。选择您需要的代码,复制代码,并对其进行定制以适合您的项目。代码完全按您喜好进行使用和修改! ### 为什么选择 Inspira UI? 该项目始于填补 `Vue` 社区中类似组件集的空白。`Inspira UI` 为Vue带来了 `Aceternity UI` 、 `Magic UI` 和自定义贡献的美感和功能,使开发人员更容易构建令人惊叹的应用程序。 ### 关键功能特性 - 完全[免费和开源](https://github.com/unovue/inspira-ui) - 高度[configu可配置rable](/components),以满足您的设计需求 - 广泛的[组件](/components)可供选择 - 针对移动设备进行了优化 - 与 Nuxt 完全兼容 ### 致谢 特别感谢: - [Aceternity UI](https://ui.aceternity.com) 启发了 VUE 的改编。 - [Magic UI](https://magicui.design) 他们的设计灵感。 - [shadcn-vue](https://www.shadcn-vue.com/) shadcn-ui 提供的 VUE 接口并为文档提供一些组件 - [shadcn-docs-nuxt](https://github.com/ZTL-UwU/shadcn-docs-nuxt) 精心制作的 nuxt 文档网站。 ### 关于我们 大家好,我是[Rahul Vashishtha](https://rahulv.dev)。受 Aceternity UI、Magic UI 和社区贡献的启发,我创建了 `Inspira UI` ,为Vue生态系统带来类似的体验。我一直在努力让它变得更好。请随时查看我在 [GitHub](https://github.com/rahul-vashishtha) 上的工作,并在[这里](https://github.com/unovue/inspira-ui)加入我的旅程! 纵享丝滑般的探讨和享受 Inspira UI 的构建吧! URL: https://inspira-ui.com/docs/zh-cn/getting-started/installation --- title: 安装 description: 如何在你的应用中安装 Inspira UI。 icon: "lucide:play" --- 本指南将帮助您在 Vue 或 Nuxt 应用程序中安装和设置 Inspira UI 组件。 ::alert{type="warning" title="对于 Tailwind CSS v3 用户"} 如果您使用的是 Tailwind CSS v3, [点击此处查看 Inspira UI v1](https://v1.inspira-ui.com). :: ::alert{type="alert"} **注意:** 如果您正在使用 `shadcn-vue` ,则可以跳过安装步骤并仅安装以下库。 ::code-group ```bash [npm] npm install @vueuse/core motion-v ``` ```bash [pnpm] pnpm install @vueuse/core motion-v ``` ```bash [bun] bun add @vueuse/core motion-v ``` ```bash [yarn] yarn add @vueuse/core motion-v ``` :: 按照本指南在 [Vue 或 Nuxt](https://motion.dev/docs/vue) 上设置 `motion-v` 。 :: ## Inspira UI 入门 ::steps ### 设置 `tailwindcss` 首先,请按照[本指南](https://tailwindcss.com/docs/installation)安装 `tailwindcss` 。 ### 添加依赖项 安装 tailwindcss 库和实用工具。 ::code-group ```bash [npm] npm install -D clsx tailwind-merge class-variance-authority tw-animate-css ``` ```bash [pnpm] pnpm install -D clsx tailwind-merge class-variance-authority tw-animate-css ``` ```bash [bun] bun add -d clsx tailwind-merge class-variance-authority tw-animate-css ``` ```bash [yarn] yarn add --dev clsx tailwind-merge class-variance-authority tw-animate-css ``` :: 安装 VueUse 和其他支持库。 ::code-group ```bash [npm] npm install @vueuse/core motion-v ``` ```bash [pnpm] pnpm install @vueuse/core motion-v ``` ```bash [bun] bun add @vueuse/core motion-v ``` ```bash [yarn] yarn add @vueuse/core motion-v ``` :: 按照本指南在 [Vue 或 Nuxt](https://motion.dev/docs/vue) 上设置 `motion-v` 。 ### 更新你的 `main.css` 文件 将以下代码添加到您的 `main.css` 文件中,这将设置组件所需的变量: ::code-group ```css [main.css] @import "tailwindcss"; @import "tw-animate-css"; @custom-variant dark (&:is(.dark *)); :root { --card: oklch(1 0 0); --card-foreground: oklch(0.141 0.005 285.823); --popover: oklch(1 0 0); --popover-foreground: oklch(0.141 0.005 285.823); --primary: oklch(0.21 0.006 285.885); --primary-foreground: oklch(0.985 0 0); --secondary: oklch(0.967 0.001 286.375); --secondary-foreground: oklch(0.21 0.006 285.885); --muted: oklch(0.967 0.001 286.375); --muted-foreground: oklch(0.552 0.016 285.938); --accent: oklch(0.967 0.001 286.375); --accent-foreground: oklch(0.21 0.006 285.885); --destructive: oklch(0.577 0.245 27.325); --destructive-foreground: oklch(0.577 0.245 27.325); --border: oklch(0.92 0.004 286.32); --input: oklch(0.92 0.004 286.32); --ring: oklch(0.705 0.015 286.067); --radius: 0.625rem; --background: oklch(1 0 0); --foreground: oklch(0.141 0.005 285.823); } .dark { --background: oklch(0.141 0.005 285.823); --foreground: oklch(0.985 0 0); --card: oklch(0.141 0.005 285.823); --card-foreground: oklch(0.985 0 0); --popover: oklch(0.141 0.005 285.823); --popover-foreground: oklch(0.985 0 0); --primary: oklch(0.985 0 0); --primary-foreground: oklch(0.21 0.006 285.885); --secondary: oklch(0.274 0.006 286.033); --secondary-foreground: oklch(0.985 0 0); --muted: oklch(0.274 0.006 286.033); --muted-foreground: oklch(0.705 0.015 286.067); --accent: oklch(0.274 0.006 286.033); --accent-foreground: oklch(0.985 0 0); --destructive: oklch(0.396 0.141 25.723); --destructive-foreground: oklch(0.637 0.237 25.331); --border: oklch(0.274 0.006 286.033); --input: oklch(0.274 0.006 286.033); --ring: oklch(0.442 0.017 285.786); } @theme inline { --color-background: var(--background); --color-foreground: var(--foreground); --color-card: var(--card); --color-card-foreground: var(--card-foreground); --color-popover: var(--popover); --color-popover-foreground: var(--popover-foreground); --color-primary: var(--primary); --color-primary-foreground: var(--primary-foreground); --color-secondary: var(--secondary); --color-secondary-foreground: var(--secondary-foreground); --color-muted: var(--muted); --color-muted-foreground: var(--muted-foreground); --color-accent: var(--accent); --color-accent-foreground: var(--accent-foreground); --color-destructive: var(--destructive); --color-destructive-foreground: var(--destructive-foreground); --color-border: var(--border); --color-input: var(--input); --color-ring: var(--ring); --radius-sm: calc(var(--radius) - 4px); --radius-md: calc(var(--radius) - 2px); --radius-lg: var(--radius); --radius-xl: calc(var(--radius) + 4px); } @layer base { * { @apply border-border outline-ring/50; } body { @apply bg-background text-foreground; } } html { color-scheme: light dark; } html.dark { color-scheme: dark; } html.light { color-scheme: light; } ``` :: ### 设置 `cn` 实用工具 将以下实用工具添加到 `lib/utils.ts` ```ts [utils.ts] import { type ClassValue, clsx } from "clsx"; import { twMerge } from "tailwind-merge"; export function cn(...inputs: ClassValue[]) { return twMerge(clsx(inputs)); } export type ObjectValues = T[keyof T]; ``` ::alert{type="success" icon="lucide:circle-check"} 太棒了!您的项目现已配置为使用 Inspira UI。 :: :: ### 可选:添加 Icon 支持 各种 Inspira UI 组件和演示都使用了带有 Iconify 图标的 `` 组件。虽然可选,但我们建议您安装它以获得最佳体验。 要为您的 Vue.js 或 Nuxt.js 项目添加图标支持,请遵循 [Iconify Vue 指南](https://iconify.design/docs/icon-components/vue/)。 ### 开始使用 Inspira UI 🚀 现在,您可以开始在项目中使用 Inspira UI 组件了。选择所需的组件,复制代码,然后将其集成到您的应用程序中。 ::read-more{title="所有组件列表" to="/components"} :: URL: https://inspira-ui.com/docs/zh-cn/getting-started/contribution --- title: 如何贡献 description: 遵循以下准则以确保顺利合作 icon: "lucide:scroll-text" --- 感谢您有兴趣为 **Inspira UI** 项目做出贡献!您的贡献有助于让这个项目更好地服务于每个人。请花点时间阅读这些指南,以确保合作顺利进行。 ## 目录 - [目录](#目录) - [快速开始](#快速开始) - [行为准则](#行为准则) - [如何贡献](#如何贡献) - [错误报告](#错误报告) - [改进建议](#改进建议) - [添加新组件](#添加新组件) - [组件指南](#组件指南) - [项目结构](#项目结构) - [样式指南](#样式指南) - [代码标准](#代码标准) - [组件格式](#组件格式) - [提交信息](#提交信息) - [文档指南](#文档指南) - [添加新组件的步骤](#添加新组件的步骤) - [单文件组件](#单文件组件) - [多文件组件](#多文件组件) - [测试](#测试) - [附加说明](#附加说明) - [许可证](#许可证) --- ## 快速开始 - **分支代码库**: 在 GitHub 上创建项目的个人分支。 - **克隆你的分支**: 将你分支的代码库克隆到本地机器。 - **创建分支**: 为你的贡献创建一个新的分支 (`git checkout -b feature/YourFeatureName`). - **安装依赖项**: 运行 `pnpm install` 安装所有必要的依赖项。 ## 行为准则 通过参与此项目,您同意遵守[行为准则](./4.code-of-conduct.md),该准则旨在营造开放和友好的环境。 ## 如何贡献 ### 错误报告 如果您发现错误,请提交[问题](https://github.com/unovue/inspira-ui/issues){:target="\_blank"} 并包含以下内容: - 清晰且描述性的标题。 - 问题重现步骤。 - 预期结果和实际结果。 - 屏幕截图或代码片段(如果可以的话)。 ### 改进建议 我们欢迎您对新功能或改进提出建议。请提交[问题](https://github.com/unovue/inspira-ui/issues){:target="\_blank"}并包含以下内容: - 清晰且描述性的标题。 - 改进的详细描述。 - 任何相关的示例或模型。 ### 添加新组件 我们非常感谢您为库添加新组件。请确保: - 该组件总体上实用,并且符合项目目标。 - 该组件兼容 **Nuxt** 和 **Vue** 。 - 请遵循以下列出的编码和文档指南。 - 请为组件添加单元测试。 - 该组件总体上实用,并且符合项目目标。 #### 组件指南 1. **创建或更新 `index.ts`** 每个 `components/content/inspira/ui//` 文件下都应包含一个 `index.ts` 以便导出所有 Vue 文件,例如: ```ts // index.ts export { default as Book } from "./Book.vue"; export { default as BookHeader } from "./BookHeader.vue"; export { default as BookTitle } from "./BookTitle.vue"; export { default as BookDescription } from "./BookDescription.vue"; ``` 2. **注册依赖:** 如果您的新组件依赖(或使用)其他 Inspira UI 组件,则必须更新 `~/scripts/crawl-content.ts` 中的 `COMPONENT_DEPENDENCIES` 映射以反映这些关系。这有助于库在用户通过 CLI 添加组件时了解应同时安装哪些组件。 3. **Nuxt 独有功能:** 如果您的新组件或其示例使用了 Nuxt 独有功能(例如 ``),请在文档中提及。这可确保用户了解在 Nuxt 之外使用该组件时可能会遇到限制或需要额外步骤。 这可确保用户可以通过 CLI 安装组件,并且所有依赖项都已正确声明。 4. **避免使用外部组件:** 避免使用外部组件:创建组件时,避免使用不属于核心 Vue.js 生态系统的外部 UI 组件(如 `` 或类似组件)。 5. **显式导入:** 即使你在开发过程中使用了 Nuxt 的自动导入功能,也请始终在组件代码中包含显式导入。这确保了与未启用自动导入的 Vue.js 用户的兼容性。例如: ```vue ``` 6. **图标使用:** 如果您需要在演示或组件中使用图标,请使用内置的 `` 组件,而不是将原始 SVG 粘贴到模板中。 ## 项目结构 了解项目结构对于有效贡献至关重要: - **组件目录**: - 主要组件应放置在 `components/content/inspira/ui//` 。 - 包含一个 `index.ts` 文件,用于导出该文件夹中的每个组件。 - 示例组件应放置在 `components/content/inspira/examples//` 。 - **文档**: - 文档文件位于 `content/2.components//` 目录中。 - 添加组件后,请在此目录中编写其文档。 ## 样式指南 ### 代码标准 - **语言**: 所有组件均应使用 **Vue.js** 编写,并支持 TypeScript。 - **样式**: 尽可能使用 **Tailwind CSS** 类进行样式设置。 - **命名规范**: 组件名称和文件名均使用 `PascalCase(大驼峰命名,即单词首字母全大写)` 命名。 ### 组件格式 您的 Vue 组件应遵循以下结构: ```vue ``` **Props 类型和代码风格** 请参阅此 Vue.js 文档页面 -> [https://vuejs.org/api/sfc-script-setup#type-only-props-emit-declarations](https://vuejs.org/api/sfc-script-setup#type-only-props-emit-declarations) ```vue ``` **常量、接口、类型和变量** 为了提高可复用性,您还可以在组件文件夹的根目录下添加一个 `index.ts` 文件,用于导出接口、常量和其他有用的代码元素。请注意,开发者会将组件代码复制粘贴到他们的项目中,因此根据他们的标准进行自定义应该非常容易。 变量必须使用 `CAPS_CAMEL_CASE` 格式,以便在代码中清晰识别。并添加 `前缀` 。请勿使用枚举;请使用 `{} as const`。😘 ```typescript // DON'T ⛔️ const Direction = { Top: 'top'} as const const ComponentNameDirection = { Top: 'top'} as const // DON'T ⛔️ enum COMPONENT_NAME_DIRECTION_WRONG = { Top = 'top'}; // DO ✅ import type { ObjectValues } from "@/lib/utils"; export const COMPONENT_NAME_DIRECTION = { Top: 'top', Bottom: 'bottom'} as const //Types and Interfaces should use CamelCase to differentiate them from constants and variables. export type ComponentNameDirection = ObjectValues; interface { direction: ComponentNameDirection; //Enforce correct value : 'top' or 'bottom' } ``` 您可以查看 `PatternBackground` 组件文件 `components/content/inspira/ui/pattern-background` 以获取完整示例。 **注意:** - 使用 ` ``` ## API | Prop 名称 | 类型 | 默认值 | 描述 | | ------------- | -------- | -------- | --------------------------------------------------------- | | `text` | `string` | Required | The text to be displayed with the hover effect. | | `duration` | `number` | `200` | The duration of the mask transition animation in seconds. | | `strokeWidth` | `number` | `0.75` | The width of the text stroke. | | `opacity` | `number` | `null` | The opacity of the text. | ``` 在这个例子中,`ComponentLoader` 、 `CodeViewer` 和 `InstallationCli` 中使用的 `id` 都是 `text-hover-effect` ,它与存储组件及其演示的文件夹名称匹配。 ### 多文件组件 对于由多个文件组成的组件,例如主组件和多个子组件或变体,请使用以下模板: 1. **前言** 从 YAML 前言开始: ```yaml --- title: Your Components Group Title description: A brief description of what this group of components does. --- ``` 2. **预览部分** 为每个示例或变体添加多个 `ComponentLoader` 部分。 `id` 应设置为 `components/content/inspira/examples/` 中组件的文件夹名称。 ```markdown ```vue // Component source not found for ComponentVariantDemo.vue ``` ``` 3. **警告** 如果您的组件有特殊要求或依赖关系,请在安装说明之前添加警告部分: ```markdown ::alert{type="info"} **注意:** This component requires `package-name` as a dependency. :: ::alert{type="warning"} **注意:** This component uses the `nuxt-only` syntax with the ``. If you are not using Nuxt, you can simply remove it. :: ``` 4. **安装** 包含 CLI 和手动安装说明。如果需要额外设置(例如,依赖项、Tailwind 配置更新),请使用分步器列出所有所需步骤。 ```markdown ## 通过 CLI 安装 ```vue ``` ## 手动安装 在同一个文件中,复制并粘贴以下代码: ::code-group :CodeViewerTab{label="YourComponent.vue" language="vue" componentName="YourComponent" type="ui" id="your-component-folder-name"} :CodeViewerTab{filename="YourComponent2.vue" language="vue" componentName="YourComponent2" type="ui" id="your-component-folder-name"} :: ``` 5. **API 文档** 提供涵盖所有组件的全面 API 文档: ```markdown ## API | Prop 名称 | 类型 | 默认值 | 描述 | | --------- | -------- | ------ | --------------------------------------- | | `prop1` | `string` | `''` | Description applicable to all variants. | ``` **示例:** ```markdown --- title: Pattern Background description: Simple animated pattern background to make your sections stand out. --- Grid background with dot ```vue ``` ## 通过 CLI 安装 ```vue ``` ## 手动安装 在同一个文件中,复制并粘贴以下代码: ::code-group :CodeViewerTab{label="PatternBackground.vue" language="vue" componentName="PatternBackground" type="ui" id="pattern-background"} :CodeViewerTab{filename="index.ts" language="typescript" componentName="index" type="ui" id="pattern-background" extension="ts"} :: ## 示例 Grid background with big dot and ellipse on top ```vue ``` Grid background without animation ```vue ``` Small grid background with animation ```vue ``` ## API | Prop 名称 | 类型 | 默认值 | 描述 | | ----------- | ------------------------------------------------------------------------------------------------------ | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `animate` | `boolean` | `false` | Set `true` if you want to animate the background. | | `direction` | `top` \| `bottom` \| `left` \| `right` \| `top-left` \| `top-right` \| `bottom-left` \| `bottom-right` | `top` | Direction of the animation movement. You can use the const `PATTERN_BACKGROUND_DIRECTION.` | | `direction` | `grid` \| `dot` | `grid` | 类型 of pattern. You can use the const `PATTERN_BACKGROUND_VARIANT.` | | `size` | `xs` \| `sm` \| `md` \| `lg` | `md` | Size of the background pattern. | | `mask` | `ellipse` \| `ellipse-top` | `ellipse` | Add a mask over the background pattern. You can use the const `PATTERN_BACKGROUND_MASK.` | | `speed` | `number` | `10000` | Duration of the animation in `ms`, the bigger it is, the slower the animation. (`20000` slower than `5000`). You can use the const `PATTERN_BACKGROUND_SPEED.` | ### 自定义变量、值和常量 您可以直接在 `index.ts` 文件中自定义您的需求。请参阅下方代码。 ## 感谢 - 灵感来自 [Magic UI's Dot Pattern](https://magicui.design/docs/components/dot-pattern) 组件。 - 灵感来自 [Magic UI's Grid Pattern](https://magicui.design/docs/components/grid-pattern) 组件。 - 灵感来自 [Magic UI's Animated Grid Pattern](https://magicui.design/docs/components/animated-grid-pattern) 组件。 - 感谢 [Nathan De Pachtere](https://nathandepachtere.com/) ,移植了该组件。 ``` ## 测试 - **单元测试**: 如果可以,请为组件编写单元测试。 - **跨环境测试**: 确保您的组件在 **Nuxt** 和 **Vue** 环境中都能正常工作 - **可视化测试**: 直观地检查组件,确保其渲染正确。 - **CLI 安装测试**: 使用 `pnpm build:registry` 更新注册表后,通过引用本地注册表 URL 在单独的项目中测试组件安装。例如: ```sh npx shadcn-vue@latest add "https://localhost:3000/r/" ``` ## 附加说明 - **组件命名**: 使用 `PascalCase` 作为组件文件名和名称。 - **IDs**: 在 `CodeViewer` 、`CodeViewerTab` 和 `ComponentLoader` 中, `id` 参数应设置为组件所在文件夹的名称,即 `components/content/inspira/ui//` 和 `components/content/inspira/examples//` 。这有助于正确链接文档中的代码和示例。 - **演示组件**: 对于每个组件,创建一个在 `ComponentLoader` 中用于预览的相应演示组件,并将其放置在 `components/content/inspira/examples//` 中。 - **本地化**: 如果您的组件支持多种语言,请在文档中包含详细信息。 ## 许可证 通过贡献,您同意您的贡献将根据 [MIT 许可证](https://github.com/unovue/inspira-ui/blob/main/LICENSE){:target="\_blank"}进行许可。 URL: https://inspira-ui.com/docs/zh-cn/getting-started/code-of-conduct --- title: 行为准则 description: 行为准则概述了我们对参与者行为的期望以及不可接受行为的后果。 icon: "lucide:award" --- ## 简介 我们致力于为所有参与 **Inspira UI** 项目的人提供一个友好、安全且温馨的环境。行为准则概述了我们对参与者行为的期望以及不可接受行为的后果。 ## 我们承诺 为了建立一个开放和包容的社区,我们承诺让每个人都能在我们的项目和社区中享受无骚扰的体验,无论: - 年龄 - 体型 - 残疾 - 种族 - 性别认同与表达 - 经验水平 - 国籍 - 外貌 - 种族 - 宗教 - 性认同与性取向 ## 预期行为 我们社区的所有参与者都应: - **尊重他人**: 对他人展现同理心和善意。 - **体贴他人**: 记住你的言行会影响他人。 - **合作**: 携手合作,实现共同目标。 - **有效沟通**: 使用清晰且建设性的语言。 - **展现专业精神**: 行为专业,并对自己的行为负责。 ## 不可接受行为 在我们社区以下行为被视为不可接受的: - **骚扰和歧视**: 包括贬损性评论、诽谤或不必要的性骚扰。 - **辱骂和威胁**: 任何形式的口头或书面辱骂、恐吓或威胁。 - **网络喷子和侮辱**: 旨在扰乱对话的挑衅性或侮辱性言论。 - **不尊重的沟通**: 包括过度使用脏话、大声叫喊(全部使用大写字母)或打断他人。 - **人身攻击**: 针对个人进行骚扰或贬低。 ## 举报指南 如果您遇到或目睹不可接受的行为,或有任何其他疑虑,请尽快通过我们的 **Discord** 频道联系项目维护人员进行举报: [Inspira UI Discord 频道](https://discord.gg/Xbh5DwJRc9) 报告事件时,请包括: - **您的联系方式**: 您的 Discord 用户名或任何您喜欢的联系方式。 - **相关人员姓名**: 涉事人员的真实姓名或用户名。 - **事件描述**: 清晰简洁的事件描述。 - **支持证据**: 任何相关信息、截图或有助于我们了解情况的上下文。 所有举报都将保密处理。 ## 执行 项目维护者有责任确保遵守本行为准则,并将对任何被视为不可接受的行为采取适当措施。措施可能包括: - 向违规者发出私下警告。 - 暂时或永久禁止其参与项目和 Discord 频道。 - 删除违反本行为准则的贡献。 ## 范围 本行为准则适用于所有项目空间,包括但不限于: - GitHub 代码块 - 问题追踪 - 拉去请求 - 项目相关论坛和聊天频道 - 与项目相关的社交媒体互动 - 官方 **Inspira UI Discord 频道** 当个人在公共场所代表项目或其社区时,本准则也适用。 ## 申诉流程 任何受到纪律处分的个人都有权在处分决定生效后一周内通过 **Discord** 频道联系项目维护人员,对处分决定提出申诉。申诉将被审核,并最终决定将另行通知。 ## 隐私 所有关于不当行为的举报都将得到谨慎处理。我们将尊重举报人和被举报人的隐私。 ## 感谢 我们感谢所有贡献者和社区成员为营造积极的环境所做的贡献。本行为准则借鉴了开源社区的最佳实践和指南。 ## 联系方式 如对本行为准则有任何疑问或疑虑,请通过我们的 **Discord** 频道联系项目维护人员: [Inspira UI Discord 频道](https://discord.gg/Xbh5DwJRc9) URL: https://inspira-ui.com/docs/zh-cn/components/backgrounds/aurora-background --- title: 极光背景 description: 为您的网站提供一个微妙的极光或南极光背景。 --- ```vue ``` ## API | Prop 名称 | 类型 | 默认值 | 描述 | | ---------------- | --------- | :----: | ------------------------------------------------------------------------- | | `class` | `string` | `-` | Additional CSS classes to apply to the component for styling. | | `radialGradient` | `boolean` | `true` | Determines whether a radial gradient effect is applied to the background. | ## 安装 ::alert Add following entry to inline theme in your `main.css` file. ```css @theme inline { --animate-aurora: aurora 60s linear infinite; @keyframes aurora { from { background-position: 50% 50%, 50% 50%; } to { background-position: 350% 50%, 350% 50%; } } } ``` :: ## 通过 CLI 安装 ```vue ``` ## 手动安装 复制并粘贴以下代码: ```vue ``` ## 功能特性 - **支持插槽**: 使用默认插槽轻松地在组件中添加任何内容。 ## 感谢 - Credits to [Aceternity UI](https://ui.aceternity.com/components/aurora-background). - Credits to [SivaReddy Uppathi](https://github.com/sivareddyuppathi) for porting this component. URL: https://inspira-ui.com/docs/zh-cn/components/backgrounds/black-hole-background --- title: 黑洞背景 description: A mesmerizing, canvas-driven background effect that simulates a warped “black-hole” tunnel with animated discs, radial lines, and particles. --- ```vue ``` ## API | Prop 名称 | 类型 | 默认值 | 描述 | | ------------------ | -------------------------- | --------------- | ------------------------------------------------------------- | | `strokeColor` | `string` | `"#737373"` | Stroke colour for the concentric discs and radial lines. | | `numberOfLines` | `number` | `50` | Total radial lines emanating from the centre. | | `numberOfDiscs` | `number` | `50` | Total concentric ellipses that form the tunnel. | | `particleRGBColor` | `[number, number, number]` | `[255,255,255]` | RGB colour used for the tiny particles flowing into the hole. | | `class` | `string` | `""` | Extra utility classes merged onto the root wrapper. | ## 通过 CLI 安装 ```vue ``` ## 手动安装 复制并粘贴以下代码: ```vue ``` ## 功能特性 - **Dynamic Canvas Rendering** – Draws concentric discs, radiating lines, and moving particles each frame. - **Radial Gradient Layers** – Uses pseudo-elements and Motion-V to overlay colourful gradients that slowly drift. - **Clip-Path Magic** – Calculates an inner ellipse and clips lines / particles for a convincing tunnel effect. - **Performance-Aware** – Adjusts for device pixel ratio and throttles work to `requestAnimationFrame`. - **Customisable** – Tweak strokes, counts, and particle colour via props to match any theme. - **Dark-Mode Friendly** – Radial backgrounds automatically invert in dark theme. - **Responsive** – Re-computes geometry and re-renders on window resize. ## 感谢 - Custom generative art logic inspired by tunnel / warp animations. - Utilises **Motion-V** for gradient drift and Vue 3 Composition API for lifecycle control. - Developed with accessibility in mind—background effect remains purely decorative via `aria-hidden` canvas. URL: https://inspira-ui.com/docs/zh-cn/components/backgrounds/bubbles-bg --- title: 泡泡背景 description: An animated background with floating bubbles. --- ```vue ``` ::alert{type="info"} **注意:** This component uses Three.js & requires `three` npm package as a dependency. :: ## 通过 CLI 安装 ```vue ``` ## 手动安装 ::steps{level=4} #### Install the dependencies ::code-group ```bash [npm] npm install three npm install -D @types/three ``` ```bash [pnpm] pnpm install three pnpm install -D @types/three ``` ```bash [bun] bun add three bun add -d @types/three ``` ```bash [yarn] yarn add three yarn add --dev @types/three ``` :: 复制并粘贴以下代码: ```vue ``` :: ## Example Without Blur or overlay ```vue ``` ## API | Prop 名称 | 类型 | 默认值 | 描述 | | --------- | -------- | ------ | --------------------------------------------------------------- | | `blur` | `number` | `0` | Amount of blur to apply to the background, specified in pixels. | ## 功能特性 - **Animated Bubble Background**: Renders a captivating background with animated, floating bubbles using 3D graphics. - **Dynamic Color Gradients**: The bubbles and background smoothly transition between colors over time, creating a visually engaging effect. - **Customizable Blur Effect**: Use the `blur` prop to adjust the blur intensity applied over the background, enhancing depth perception. - **Slot Support**: Easily overlay content on top of the animated background using the default slot. - **Responsive Design**: The component adjusts to fit the width and height of its parent container, ensuring compatibility across different screen sizes. ## 感谢 - Built with the [Three.js](https://threejs.org/) library for 3D rendering and animations. - Inspired from [Tresjs Experiment](https://lab.tresjs.org/experiments/overlay). URL: https://inspira-ui.com/docs/zh-cn/components/backgrounds/cosmic-portal --- title: 宇宙环球 description: A breathtaking, animated 3D portal built with Three.js that features glowing rings, floating crystals, space distortion, and interdimensional streams. --- ```vue ``` ## API | Prop 名称 | 类型 | 默认值 | 描述 | | ------------------ | -------- | --------- | ----------------------------------------------------------- | | `portalComplexity` | `number` | `4` | Controls the complexity of the portal effects and geometry. | | `crystalCount` | `number` | `12` | Number of floating crystals in the scene. | | `primaryColor` | `string` | `#9b59b6` | Main color for portal and background glow. | | `secondaryColor` | `string` | `#3498db` | Secondary color for blending and glow. | | `accentColor` | `string` | `#e74c3c` | Color used for portal energy and highlight. | | `vortexColor` | `string` | `#2ecc71` | Color used for swirling vortex and dimensional streams. | | `rotationSpeed` | `number` | `0.3` | Speed at which objects rotate. | | `bloomStrength` | `number` | `1.2` | Intensity of bloom postprocessing. | | `bloomRadius` | `number` | `0.7` | Radius of the bloom effect. | | `bloomThreshold` | `number` | `0.2` | Threshold for bloom visibility. | | `dimensionShift` | `number` | `4` | Level of dimension distortion for shader animation. | ## 功能特性 - **Stunning Visuals**: Animated cosmic background, glowing vortex rings, and interdimensional streams. - **Shader Driven Effects**: Unique portal burst, distortion, and pulsing animations. - **User Controls**: Zoom, rotate, and orbit around the scene using OrbitControls. - **Postprocessing**: Includes bloom and FXAA for cinematic quality. - **Dynamic Colors**: Easily shift dimensions and regenerate colors using exposed methods. - **Exposed Actions**: Call `activatePortal()` to trigger portal effects or `shiftDimensions()` to regenerate the visual style. ## 安装 确保在您的项目中安装了以下库: :pm-install{name="three postprocessing"} :pm-install{name="@types/three" save-dev} ## 通过 CLI 安装 ```vue ``` ## 手动安装 复制和粘贴下列代码: ```vue ``` ## 感谢 - 灵感和移植自 [Dimensional Portal by Techartist](https://x.com/techartist_). URL: https://inspira-ui.com/docs/zh-cn/components/backgrounds/falling-stars --- title: 流星背景 description: A stunning animated starfield background with glowing and sharp trail effects. --- ```vue ``` ## 通过 CLI 安装 ```vue ``` ## 手动安装 复制并粘贴以下代码: ```vue ``` ## API | Prop 名称 | 类型 | 默认值 | 描述 | | --------- | -------- | -------- | ------------------------------------------- | | `color` | `string` | `"#FFF"` | Color of the stars in the starfield. | | `count` | `number` | `200` | Number of stars displayed in the animation. | ## 功能特性 - **Dynamic Starfield**: Creates a 3D starfield effect with stars moving toward the viewer. - **Glowing and Sharp Trail Effects**: Each star has a sharp line and a blurred, glowing trail. - **Customizable**: Adjust the `color` of the stars and control the number of stars using the `count` prop. - **Responsive Design**: Automatically adapts to the size of the canvas, ensuring a full-screen starfield effect. ## 感谢 - Inspired by 3D starfield simulations and trail effects in modern canvas animations. - Credit to [Prodromos Pantos](https://github.com/prpanto) for porting the original component to Vue & Nuxt. URL: https://inspira-ui.com/docs/zh-cn/components/backgrounds/flickering-grid --- title: Flickering Grid description: A flickering grid background made with Canvas, fully customizable using Tailwind CSS. --- ```vue ``` ::alert{type="warning"} This component uses the `nuxt-only` syntax with the ``. If you are not using Nuxt, you can simply remove it. :: ## 通过 CLI 安装 ```vue ``` ## 手动安装 复制并粘贴以下代码: ```vue ``` ## API | Prop 名称 | 类型 | 默认值 | 描述 | | --------------- | -------- | -------------- | -------------------------------------- | | `squareSize` | `number` | `4` | Size of each square in the grid. | | `gridGap` | `number` | `6` | Gap between squares in the grid. | | `flickerChance` | `number` | `0.3` | Probability of a square flickering. | | `color` | `string` | `rgb(0, 0, 0)` | Color of the squares. | | `width` | `number` | `-` | Width of the canvas. | | `height` | `number` | `-` | Height of the canvas. | | `class` | `string` | `-` | Additional CSS classes for the canvas. | | `maxOpacity` | `number` | `0.2` | Maximum opacity of the squares. | ## 感谢 - Credits to [magicui flickering-grid](https://magicui.design/docs/components/flickering-grid) for this component. URL: https://inspira-ui.com/docs/zh-cn/components/backgrounds/interactive-grid-pattern --- title: 交互网格背景 description: A interactive background grid pattern made with SVGs, fully customizable. --- ```vue ``` ## 通过 CLI 安装 ```vue ``` ## 手动安装 复制并粘贴以下代码: ```vue ``` ## 示例 ```vue ``` ## API #### Props | Prop 名称 | 类型 | 默认值 | 描述 | | ------------------ | ------------------ | ---------- | --------------------------------------------- | | `className` | `string` | - | Additional classes for styling the component. | | `squaresClassName` | `string` | - | Additional classes for styling the squares. | | `width` | `number` | `40` | Width of the square in pixels. | | `height` | `number` | `40` | Height of the square in pixels. | | `squares` | `[number, number]` | `[24, 24]` | Number of squares in the grid pattern. | ## 感谢 - Inspired by [MagicUI](https://magicui.design/docs/components/interactive-grid-pattern). - Credits to [kalix127](https://github.com/kalix127) for porting this component. URL: https://inspira-ui.com/docs/zh-cn/components/backgrounds/lamp-effect --- title: 灯光效果 description: A captivating lamp lighting effect with conic gradients, spotlights, and glowing lines for an immersive visual experience. --- ```vue ``` ## 通过 CLI 安装 ```vue ``` ## 手动安装 复制并粘贴以下代码: ```vue ``` ## API | Prop 名称 | 类型 | 默认值 | 描述 | | ---------- | -------- | ------ | ---------------------------------------------- | | `delay` | `number` | `0.5` | Delay before the animation starts, in seconds. | | `duration` | `number` | `0.8` | Duration of the animation, in seconds. | | `class` | `string` | `""` | Additional CSS classes for custom styling. | ## 功能特性 - **Conic Gradient Animation**: Creates a smooth expanding conic gradient effect, giving a dynamic light-source appearance. - **Spotlight Animation**: The spotlight smoothly expands, providing a focused lighting effect. - **Glowing Line Effect**: A glowing line animates across the center, simulating a light beam or laser. - **Customizable Timing**: The `delay` and `duration` props allow for precise control of animation timings. - **Slot-Based Content**: Supports default slot content, making it easy to overlay text or other components. ## 感谢 - Ported from [Aceternity UI](https://ui.aceternity.com/components/lamp-effect) URL: https://inspira-ui.com/docs/zh-cn/components/backgrounds/liquid-background --- title: Liquid Background description: A reactive and dynamic background effect using OGL for WebGL-based visuals. --- ```vue ``` ## API This component does not require external props to function, as it dynamically renders the liquid background effect on mount. ::alert{type="info"} **注意:** This component uses OGL Web Renderer & requires `ogl` npm package as a dependency. :: ## 通过 CLI 安装 ```vue ``` ## 手动安装 You can 复制并粘贴以下代码: to create this component: ::code-group ::CodeViewerTab{label="LiquidBackground.vue" language="vue" componentName="LiquidBackground" type="ui" id="liquid-background"} :: :: ## 功能特性 - **WebGL Rendering**: Utilizes the OGL library to provide hardware-accelerated background effects. - **Animated Shader**: Runs a custom fragment and vertex shader to generate a liquid-like visual animation. - **Automatic Resizing**: Listens to window resize events and adjusts the canvas dimensions accordingly. - **Clean Resource Management**: Disposes of the WebGL context and removes event listeners upon unmount, preventing memory leaks. ## Implementation Details 1. **OGL Renderer**: Creates a renderer with `new Renderer()` and appends the associated `canvas` to the DOM. 2. **Shader Programs**: Defines vertex (`vert`) and fragment (`frag`) shaders, where the fragment shader implements the liquid animation logic. 3. **Triangle Geometry**: Uses OGL’s built-in `Triangle` geometry for a full-screen quad. 4. **Uniforms**: - `uTime`: Updated each frame to animate the shader. - `uResolution`: Adjusted on window resize to maintain consistent visuals. - `uColor`: An example color uniform (slightly purple) used in the shader. 5. **Animation Loop**: Schedules updates via `requestAnimationFrame`, updates `uTime`, and renders the scene. ## 感谢 - Built with the [OGL](https://github.com/oframe/ogl) library for 3D rendering. - Inspired by generative art patterns. - Uses Vue's Composition API for lifecycle and state management. URL: https://inspira-ui.com/docs/zh-cn/components/backgrounds/neural-background --- title: Neural Background description: 一个使用 OGL 和 GLSL 实现的动态神经元风格背景动画,基于 Shader 渲染。 navBadges: - value: 新 type: lime --- ```vue ``` ## API 接口 | 属性名 | 类型 | 默认值 | 描述 | | ------------ | -------- | ------ | ----------------------------------------------- | | `hue` | `number` | `200` | 背景颜色的基础色相,单位为角度(0–360)。 | | `saturation` | `number` | `0.8` | 背景颜色的饱和度,范围为 0–1。 | | `chroma` | `number` | `0.6` | 背景颜色的明度(或色度),范围为 0–1。 | | `class` | `string` | `—` | 可选的额外 CSS 类名,用于自定义 canvas 的样式。 | > 💡 该组件默认是一个全屏固定的背景,并使用 `pointer-events-none`,可通过 `class` 属性自定义样式。 ## 使用 CLI 安装 ```vue ``` ## 手动安装 ```vue ``` ## 功能特性 - **GPU 加速动画**:基于 [OGL](https://github.com/oframe/ogl) 实现高性能 WebGL 渲染。 - **神经网络风格视觉**:递归 shader 图形生成,模拟大脑神经网络般的流动视觉。 - **实时指针交互**:背景动态实时响应鼠标和触控移动。 - **滚动驱动变化**:颜色和亮度会随页面滚动轻微波动,增强沉浸感。 - **颜色调节支持**:支持通过 Props 实时调整色相、饱和度和明度。 - **响应式画布**:自动适配视口大小和设备像素比,适应各种屏幕。 ## 说明 - 使用了自定义片元着色器(Fragment Shader)与递归正弦波算法来生成复杂的有机视觉效果。 - 性能已针对现代浏览器与 GPU 优化,旧设备和浏览器可能不支持或表现不佳。 - 适合用作装饰性背景(如全屏封面、英雄区域等),非内容交互用途。 ## 致谢 - 构建基于轻量级 WebGL 框架 [OGL](https://github.com/oframe/ogl)。 - 图形逻辑基于递归三角函数叠加算法。 - 灵感与代码部分来自 [Cursify 的 Neural Glow Cursor](https://cursify.vercel.app/components/neural-glow)。 URL: https://inspira-ui.com/docs/zh-cn/components/backgrounds/particle-whirlpool-bg --- title: 粒子漩涡 description: 一个带有粒子旋转的动画背景。 --- ```vue ``` ::alert{type="info"} **注意:** This component uses Three.js & requires `three` & `postprocessing` npm package as a dependency. :: ## 通过 CLI 安装 ```vue ``` ## 手动安装 ::steps{level=4} #### Install the dependencies ::code-group ```bash [npm] npm install three postprocessing npm install -D @types/three ``` ```bash [pnpm] pnpm install three postprocessing pnpm install -D @types/three ``` ```bash [bun] bun add three postprocessing bun add -d @types/three ``` ```bash [yarn] yarn add three postprocessing yarn add --dev @types/three ``` :: 复制并粘贴以下代码: ```vue ``` :: ## 示例 Without blur and overlay ```vue ``` With `particleCount` 500 ```vue ``` ## API | Prop 名称 | 类型 | 默认值 | 描述 | | --------------- | -------- | ------ | --------------------------------------------------------------- | | `class` | `string` | `""` | Additional CSS classes for custom styling. | | `blur` | `number` | `0` | Amount of blur to apply to the background, specified in pixels. | | `particleCount` | `number` | `2000` | Number of particles in the whirlpool animation. | ## 功能特性 - **Interactive Whirlpool Animation**: Renders a captivating whirlpool effect with particles that respond to mouse and touch interactions. - **Customizable Particle Count**: Adjust the `particleCount` prop to control the number of particles in the animation. - **Dynamic Blur Effect**: Use the `blur` prop to apply a blur effect over the background, enhancing the visual depth. - **Slot Support**: Overlay additional content on top of the animation using the default slot. - **Responsive Design**: The component adjusts to fit the width and height of its parent container, ensuring compatibility across different screen sizes. ## 感谢 - Built with the [Three.js](https://threejs.org/) library for 3D rendering and animations. - Inspired by [TroisJs](https://troisjs.github.io/examples/demos/3.html) URL: https://inspira-ui.com/docs/zh-cn/components/backgrounds/particles-bg --- title: 粒子背景 description: 粒子背景效果可以为你的网站增加一个动态和引人入胜的视觉效果。它们有助于创造一种深度、动感和互动的感觉,使网站在视觉上更具吸引力。 --- ```vue ``` ## 通过 CLI 安装 ```vue ``` ## 手动安装 复制并粘贴以下代码: ```vue ``` ## API | Prop 名称 | 类型 | 默认值 | 描述 | | ----------- | -------- | ------ | ----------------------------------------------------------------------------------------------------------- | | `color` | `string` | `#FFF` | Hexadecimal color code used for particles. Supports 3 or 6 character hex codes. | | `quantity` | `number` | `100` | The number of particles to generate and display on the canvas. | | `staticity` | `number` | `50` | Determines how much the particles move based on the mouse's proximity. Higher values reduce movement. | | `ease` | `number` | `50` | Controls the easing effect of particle movement; lower values make particles follow the mouse more closely. | ## 感谢 - Credits to [Magic UI](https://magicui.design/docs/components/particles) for this fantastic component. - Credit to [Prodromos Pantos](https://github.com/prpanto) for porting the original component to Vue & Nuxt. URL: https://inspira-ui.com/docs/zh-cn/components/backgrounds/pattern-background --- title: Pattern Background description: Simple animated pattern background to make your sections stand out. --- Grid background with dot ```vue ``` ## 通过 CLI 安装 ```vue ``` ## 手动安装 在同一个文件中,复制并粘贴以下代码: ::code-group :CodeViewerTab{label="PatternBackground.vue" language="vue" componentName="PatternBackground" type="ui" id="pattern-background"} :CodeViewerTab{filename="index.ts" language="typescript" componentName="index" type="ui" id="pattern-background" extension="ts"} :: ## 示例 Grid background with big dot and ellipse on top ```vue ``` Grid background without animation ```vue ``` Small grid background with animation ```vue ``` ## API | Prop 名称 | 类型 | 默认值 | 描述 | | ----------- | ------------------------------------------------------------------------------------------------------ | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `animate` | `boolean` | `false` | Set `true` if you want to animate the background. | | `direction` | `top` \| `bottom` \| `left` \| `right` \| `top-left` \| `top-right` \| `bottom-left` \| `bottom-right` | `top` | Direction of the animation movement. You can use the const `PATTERN_BACKGROUND_DIRECTION.` | | `direction` | `grid` \| `dot` | `grid` | 类型 of pattern. You can use the const `PATTERN_BACKGROUND_VARIANT.` | | `size` | `xs` \| `sm` \| `md` \| `lg` | `md` | Size of the background pattern. | | `mask` | `ellipse` \| `ellipse-top` | `ellipse` | Add a mask over the background pattern. You can use the const `PATTERN_BACKGROUND_MASK.` | | `speed` | `number` | `10000` | Duration of the animation in `ms`, the bigger it is, the slower the animation. (`20000` slower than `5000`). You can use the const `PATTERN_BACKGROUND_SPEED.` | ### Custom variants, values and constants You can customize your needs directly within the `index.ts` file. See code below. ## 感谢 - Inspired by [Magic UI's Dot Pattern](https://magicui.design/docs/components/dot-pattern) component. - Inspired by [Magic UI's Grid Pattern](https://magicui.design/docs/components/grid-pattern) component. - Inspired by [Magic UI's Animated Grid Pattern](https://magicui.design/docs/components/animated-grid-pattern) component. - Credits to [Nathan De Pachtere](https://nathandepachtere.com/) for porting this component. URL: https://inspira-ui.com/docs/zh-cn/components/backgrounds/ripple --- title: 涟漪 description: 一种动画涟漪效应,通常用于元素后面以强调它们。 --- ```vue ``` ## 通过 CLI 安装 ```vue ``` ## 手动安装 在同一个文件中,复制并粘贴以下代码: ::code-group :CodeViewerTab{label="Ripple.vue" language="vue" componentName="Ripple" type="ui" id="ripple"} :CodeViewerTab{filename="RippleCircle.vue" language="vue" componentName="RippleCircle" type="ui" id="ripple"} :CodeViewerTab{filename="RippleContainer.vue" language="vue" componentName="RippleContainer" type="ui" id="ripple"} :: ## 示例 Only lines ```vue ``` Squared ```vue ``` Blobed ```vue ``` ## API | Prop 名称 | 类型 | 默认值 | 描述 | | ----------------------------- | -------- | ----------- | ---------------------------------------------------------------------- | | `baseCircleSize` | `number` | `210` | The size of the main circle in pixels. | | `baseCircleOpacity` | `number` | `0.24` | The opacity of the main circle. | | `spaceBetweenCircle` | `number` | `70` | The space between each ripple circle in pixels. | | `circleOpacityDowngradeRatio` | `number` | `0.03` | The rate at which opacity decreases for each successive ripple circle. | | `circleClass` | `string` | `undefined` | CSS class name(s) for additional styling of circles. | | `waveSpeed` | `number` | `80` | The animation speed for the wave effect, measured in ms. | | `numberOfCircles` | `number` | `7` | The number of ripple circles to render. | ## 感谢 - Credits to [Magic UI](https://magicui.design/docs/components/ripple). - Credits to [SivaReddy Uppathi](https://github.com/sivareddyuppathi) for porting this component. - Credits to [Nathan De Pachtere](https://nathandepachtere.com/) for updating this component. URL: https://inspira-ui.com/docs/zh-cn/components/backgrounds/silk-background --- title: 丝绸背景 description: 一个由着色器驱动的柔和流动背景,灵感来自丝绸布料的运动与质感,使用 ShaderToy 渲染。 navBadges: - value: 新 type: lime --- ```vue ``` ## API 接口 | 属性名 | 类型 | 默认值 | 描述 | | ------------ | -------- | ------ | ------------------------------------------------- | | `hue` | `number` | `300` | 丝绸纹理的基础色调(单位为度,范围 0–360)。 | | `saturation` | `number` | `0.5` | 颜色的饱和度(范围 0–1)。 | | `brightness` | `number` | `1` | 输出颜色的亮度倍增因子(推荐范围 0–2)。 | | `speed` | `number` | `1` | 控制动画速度的倍数(例如 `2` 表示两倍速)。 | | `class` | `string` | `—` | 可选,容器 div 的额外 CSS 类(例如 z-index 等)。 | > 💡 此组件默认使用全屏绝对定位容器。你可以通过 `class` 属性自定义位置或层级。 ## 使用 CLI 安装 ```vue ``` ## 手动安装 ```vue ``` ## 特性 - **着色器驱动的丝绸效果**:基于片段着色器,使用递归三角函数和噪声模拟柔软丝绸的运动。 - **实时动画**:在 GPU 上运行,具有流畅的过渡和自然波动。 - **交互响应**:当鼠标光标活动时,具有微妙的视差和扭曲效果。 - **自定义颜色控制**:通过属性调整色调、饱和度、亮度和动画速度。 - **轻量高性能**:优化的 GLSL 逻辑,适用于现代 GPU 和浏览器。 - **模块化设计**:将 GLSL 着色器嵌入 `ShaderToy` 包装组件中,便于复用。 ## 注意事项 - 改编自 [这个 ShaderToy 着色器](https://www.shadertoy.com/view/X3yXRd),由 Giorgi Azmaipharashvili 创作(MIT 许可证)。 - 主要用于装饰性用途,例如全屏英雄背景或分割区块。 - 着色器结合了正弦波函数、噪声层和基于距离的扭曲。 - 由于对 GPU 要求较高,不推荐在低端设备上使用。 ## 致谢 - 嵌入到 Vue 组件中,并根据传入属性实现动态输入。 - 灵感来自丝绸质感与有机材质中的流动运动模式。 URL: https://inspira-ui.com/docs/zh-cn/components/backgrounds/snowfall-bg --- title: Snowfall Background description: A beautifully animated snowfall effect applied as a background. --- ```vue ``` ## 通过 CLI 安装 ```vue ``` ## 手动安装 复制并粘贴以下代码: ```vue ``` ## API | Prop 名称 | 类型 | 默认值 | 描述 | | ----------- | -------- | ------ | --------------------------------------------------------- | | `color` | `string` | `#FFF` | Color of the snowflakes in hexadecimal format. | | `quantity` | `number` | `100` | Number of snowflakes to display. | | `speed` | `number` | `1` | Speed at which snowflakes fall. | | `maxRadius` | `number` | `3` | Maximum radius of snowflakes. | | `minRadius` | `number` | `1` | Minimum radius of snowflakes. | | `class` | `string` | `null` | Additional CSS classes to apply to the container element. | ## 感谢 - Inspired by natural snowfall effects. URL: https://inspira-ui.com/docs/zh-cn/components/backgrounds/sparkles --- title: Sparkles description: A configurable sparkles component that can be used as a background or as a standalone component. --- ```vue ``` ## 通过 CLI 安装 ```vue ``` ## 手动安装 复制并粘贴以下代码: ```vue ``` ## 示例 Sparkles Full Page ```vue ``` ## API | Prop 名称 | 类型 | 默认值 | 描述 | | ----------------- | -------- | ----------- | -------------------------------------------------------------------------------------- | | `background` | `string` | `'#0d47a1'` | Background color of the container. Use 'transparent' to see through to parent element. | | `particleColor` | `string` | `'#ffffff'` | Color of the particles. Accepts any valid CSS color value. | | `minSize` | `number` | `1` | Minimum size of particles in pixels. | | `maxSize` | `number` | `3` | Maximum size of particles in pixels. | | `speed` | `number` | `4` | Movement speed multiplier. Higher values create faster movement. | | `particleDensity` | `number` | `120` | Number of particles to render. Higher values create denser particle fields. | ## 感谢 - Credits to [M Atif](https://github.com/atif0075) for porting this component. - Ported from [Aceternity UI's Sparkles](https://ui.aceternity.com/components/sparkles). URL: https://inspira-ui.com/docs/zh-cn/components/backgrounds/stars-background --- title: 星星背景 description: 一个使用分层运动和随机星星位置实现视差动画效果的星空背景。 navBadges: - value: 新 type: lime --- ```vue ``` ## API 接口 | 属性名 | 类型 | 默认值 | 描述 | | ------------ | --------------- | -------------------------------- | -------------------------------------------------- | | `factor` | `number` | `0.05` | 鼠标视差移动的倍数。 | | `speed` | `number` | `50` | 星层垂直循环动画的基础速度(单位:秒)。 | | `transition` | `SpringOptions` | `{ stiffness: 50, damping: 20 }` | 鼠标移动响应的弹性物理动画配置,确保运动流畅自然。 | | `starColor` | `string` | `"#fff"` | 星星的颜色。支持任何合法的 CSS 颜色值。 | | `class` | `string` | `—` | 可选,容器 div 的附加类。可用于设置 z-index 等。 | > 💡 此组件包装了一个插槽(slot),你可以在背景上放置其他 UI 元素。 ## 使用 CLI 安装 ```vue ``` ## 手动安装 ```vue ``` ## 特性 - **动画星空背景**:渲染三个独立滚动的星层,具有不同的大小和密度。 - **视差效果**:响应鼠标移动,使用弹性物理动画增加层次感与真实感。 - **可自定义星星密度**:每一层使用不同数量的星星,呈现自然变化。 - **支持插槽**:作为视觉容器使用,允许在上层叠加前景 UI 或其他内容。 - **响应式设计** ## 致谢 - 移植自 [Animate UI](https://animate-ui.com/docs/backgrounds/stars) URL: https://inspira-ui.com/docs/zh-cn/components/backgrounds/stractium-background --- title: Stractium 背景 description: 一个基于着色器的背景,灵感来自复杂的分形图案和有机纹理,使用光线行进(raymarching)和 GLSL 创建。该效果旨在模拟复杂且不断演变的视觉纹理。 navBadges: - value: 新 type: lime --- ```vue ``` ## API 接口 | 属性名 | 类型 | 默认值 | 描述 | | ------------------ | -------- | ------ | ------------------------------------------------- | | `hue` | `number` | `0` | 分形纹理的基础色调(0–360 度)。 | | `saturation` | `number` | `1` | 颜色的饱和度(0–1)。 | | `brightness` | `number` | `1` | 输出颜色的亮度倍增因子(推荐范围 0–2)。 | | `speed` | `number` | `1` | 纹理动画的速度倍数。 | | `mouseSensitivity` | `number` | `0.5` | 控制纹理对鼠标移动响应的灵敏度(0–1)。 | | `damping` | `number` | `1` | 阻尼系数,用于控制纹理变形的平滑程度(0–1)。 | | `class` | `string` | `—` | 可选,容器 div 的附加 CSS 类(例如 z-index 等)。 | > 💡 此组件适用于全屏或大型背景区块。它针对现代 GPU 进行了优化,但在低端设备上可能性能较差。 ## 使用 CLI 安装 ```vue ``` ## 手动安装 ```vue ``` ## 特性 - **分形与有机视觉效果**:基于光线行进技术,创建复杂演化的分形纹理,模拟自然现象。 - **动态鼠标交互**:根据鼠标移动产生微妙的纹理变形与位移,增强沉浸感。 - **颜色控制**:可完全控制色调、饱和度、亮度和动画速度,以契合设计风格。 - **性能优化**:尽管效果复杂,该着色器已针对现代浏览器和 GPU 实时性能进行优化。 - **可扩展性强**:既可用于全屏背景,也可应用于小型模块,支持缩放与运动参数调整。 - **着色器驱动动画**:实时演化的分形效果,拥有流畅的过渡与动画表现。 ## 注意事项 - 基于原作者在 ShaderToy 上发布的片段着色器(MIT 许可证)。 - 着色器使用光线行进技术生成高度精细的有机纹理,包含微妙光照与环境光遮蔽效果。 - 不推荐在低端设备上使用,因着色器复杂性可能导致性能下降。 - 最佳使用场景为全屏 hero 区块或大型设计区域。 ## 致谢 - 嵌入为 Vue 组件,并通过 props 实现动态输入控制。 - 灵感来源于分形图案、自然纹理及高级光线行进技术。 URL: https://inspira-ui.com/docs/zh-cn/components/backgrounds/tetris --- title: 俄罗斯方块 description: 俄罗斯方块的背景组件,你甚至可以点击一个方块来消除它。 --- ```vue ``` ::alert{type="warning"} This component uses the `nuxt-only` syntax with the ``. If you are not using Nuxt, you can simply remove it. :: ::alert{type="info"} **注意:** This component requires `theme-colors` as a dependency. :: ## API | Prop 名称 | 类型 | 默认值 | 描述 | | -------------- | -------- | ------ | ---------------------------------------------- | | `class` | `string` | `""` | Additional class names to style the component. | | `base` | `number` | `10` | How many blocks do you have in a row. | | `square-color` | `string` | `""` | Square color. | ## 通过 CLI 安装 ```vue ``` ## 手动安装 ::steps{level=4} #### Install the dependencies ::code-group ```bash [npm] npm install theme-colors ``` ```bash [pnpm] pnpm install theme-colors ``` ```bash [bun] bun add theme-colors ``` ```bash [yarn] yarn add theme-colors ``` :: 复制并粘贴以下代码: ```vue ``` :: ## 感谢 - Credits to [Whbbit1999](https://github.com/Whbbit1999) for this component. - Inspired and ported from [Nuxt UI Home](https://ui2.nuxt.com/). URL: https://inspira-ui.com/docs/zh-cn/components/backgrounds/video-text --- title: 视频文字 description: 一个带有视频背景的文本组件。 --- ```vue ``` ## 通过 CLI 安装 ```vue ``` ## 手动安装 复制并粘贴以下代码: ```vue ``` ## API | Prop 名称 | 类型 | 默认值 | 描述 | | ------------------ | -------------------------------- | -------------- | ------------------------------------- | | `src` | `string` | `Required` | The video source URL. | | `class` | `string` | `""` | Additional classes for the container. | | `autoPlay` | `boolean` | `true` | Whether to autoplay the video. | | `muted` | `boolean` | `true` | Whether to mute the video. | | `loop` | `boolean` | `true` | Whether to loop the video. | | `preload` | `"auto" \| "metadata" \| "none"` | `"auto"` | Whether to preload the video. | | `fontSize` | `string \| number` | `"120"` | Font size for the text mask. | | `fontWeight` | `string \| number` | `"bold"` | Font weight for the text mask. | | `textAnchor` | `string` | `"middle"` | Text anchor for the text mask. | | `dominantBaseline` | `string` | `"middle"` | Dominant baseline for the text mask. | | `fontFamily` | `string` | `"sans-serif"` | Font family for the text mask. | ## 感谢 - Credits to [SivaReddy Uppathi](https://github.com/sivareddyuppathi) for this component. - Ported from [Magic UI's Video Text](https://magicui.design/docs/components/video-text). URL: https://inspira-ui.com/docs/zh-cn/components/backgrounds/vortex --- title: 炫彩涡流 description: A wavy, swirly, vortex background ideal for CTAs and backgrounds. --- ```vue ``` ::alert{type="info"} **注意:** This component requires `simplex-noise` as a dependency. :: ## 通过 CLI 安装 ```vue ``` ## 手动安装 ::steps{level=4} #### Install the dependencies ::code-group ```bash [npm] npm install simplex-noise ``` ```bash [pnpm] pnpm install simplex-noise ``` ```bash [bun] bun add simplex-noise ``` ```bash [yarn] yarn add simplex-noise ``` :: 复制并粘贴以下代码: ```vue ``` :: ## Example Full page demo usage ```vue ``` ## API | Prop 名称 | 类型 | 默认值 | 描述 | | ----------------- | -------- | ----------- | ---------------------------------------------------- | | `class` | `string` | | Optional className for styling the children wrapper. | | `containerClass` | `string` | | Optional className for styling the container. | | `particleCount` | `number` | `700` | Number of particles to be generated. | | `rangeY` | `number` | `100` | Vertical range for particle movement. | | `baseHue` | `number` | `220` | Base hue for particle color. | | `baseSpeed` | `number` | `0.0` | Base speed for particle movement. | | `rangeSpeed` | `number` | `1.5` | Range of speed variation for particles. | | `baseRadius` | `number` | `1` | Base radius of particles. | | `rangeRadius` | `number` | `2` | Range of radius variation for particles. | | `backgroundColor` | `string` | `"#000000"` | Background color of the canvas. | ## 功能特性 - **Slot Support**: Easily add any content inside the component using the default slot. ## 感谢 - Credits to [Aceternity UI](https://ui.aceternity.com/components/vortex). - Credits to [SivaReddy Uppathi](https://github.com/sivareddyuppathi) for porting this component. URL: https://inspira-ui.com/docs/zh-cn/components/backgrounds/warp-background --- title: Warp Background description: A container component that applies a warp animation effect to its children --- ```vue ``` ## 通过 CLI 安装 ```vue ``` ## 手动安装 在同一个文件中,复制并粘贴以下代码: ::code-group :CodeViewerTab{label="WarpBackground.vue" language="vue" componentName="WarpBackground" type="ui" id="warp-background"} :CodeViewerTab{filename="Beam.vue" language="vue" componentName="Beam" type="ui" id="warp-background"} :: ## API | Prop 名称 | 类型 | 默认值 | 描述 | | -------------- | -------- | ---------------------- | ----------------------------------------- | | `perspective` | `number` | `100` | The perspective of the warp animation | | `beamsPerSide` | `number` | `3` | The number of beams per side | | `beamSize` | `number` | `5` | The size of the beams | | `beamDelayMax` | `number` | `3` | The maximum delay of the beams in seconds | | `beamDelayMin` | `number` | `0` | The minimum delay of the beams in seconds | | `beamDuration` | `number` | `3` | The duration of the beams | | `gridColor` | `string` | `"hsl(var(--border))"` | The color of the grid lines | ## 感谢 - Credits to [Whbbit1999](https://github.com/Whbbit1999) for this component. - Inspired and ported from [Magic UI WarpBackground](https://magicui.design/docs/components/warp-background). URL: https://inspira-ui.com/docs/zh-cn/components/backgrounds/wavy-background --- title: 波浪背景 description: 一个酷炫的波浪背景效果。 --- ```vue ``` ::alert{type="info"} **注意:** This component requires `simplex-noise` as a dependency. :: ## 通过 CLI 安装 ```vue ``` ## 手动安装 ::steps{level=4} #### Install the dependencies ::code-group ```bash [npm] npm install simplex-noise ``` ```bash [pnpm] pnpm install simplex-noise ``` ```bash [bun] bun add simplex-noise ``` ```bash [yarn] yarn add simplex-noise ``` :: 复制并粘贴以下代码: ```vue ``` :: ## API | Prop 名称 | 类型 | 默认值 | 描述 | | ---------------- | ------------------ | --------------------------------------------------------- | ---------------------------------------------------------- | | `class` | `string` | `-` | The content to be displayed on top of the wavy background. | | `containerClass` | `string` | `-` | The CSS class to apply to the content container. | | `colors` | `string[]` | `["#38bdf8", "#818cf8", "#c084fc", "#e879f9", "#22d3ee"]` | The colors of the waves. | | `waveWidth` | `number` | `50` | The width of the waves. | | `backgroundFill` | `string` | `"black"` | The background color. | | `blur` | `number` | `10` | The blur effect applied to the waves. | | `speed` | `"slow" \| "fast"` | `"fast"` | Range of speed variation for particles. | | `waveOpacity` | `number` | `0.5` | Base radius of particles. | | `[key: string]` | `any` | `-` | Range of radius variation for particles. | ## 功能特性 - **Slot Support**: Easily add any content inside the component using the default slot. ## 感谢 - Credits to [Aceternity UI](https://ui.aceternity.com/components/wavy-background). - Credits to [SivaReddy Uppathi](https://github.com/sivareddyuppathi) for porting this component. URL: https://inspira-ui.com/docs/zh-cn/components/buttons/gradient-button --- title: Gradient Button description: A stylish animated button with a rotating conic gradient border and customizable properties for a vibrant look. --- ```vue ``` ## 通过 CLI 安装 ```vue ``` ## 手动安装 复制并粘贴以下代码: ```vue ``` ## API | Prop 名称 | 类型 | 默认值 | 描述 | | -------------- | ---------- | -------------------- | ------------------------------------------------------------ | | `borderWidth` | `number` | `2` | Width of the gradient border in pixels. | | `colors` | `string[]` | Rainbow Colors Array | Array of colors used in the conic gradient border. | | `duration` | `number` | `2500` | Duration of the gradient rotation animation in milliseconds. | | `borderRadius` | `number` | `8` | Border radius for rounded corners in pixels. | | `blur` | `number` | `4` | Blur intensity of the gradient border effect in pixels. | | `class` | `string` | `""` | Additional CSS classes for custom styling. | | `bgColor` | `string` | `"#000"` | Background color of the button content. | ## 功能特性 - **Rotating Conic Gradient Border**: A dynamic, rotating conic gradient border creates a visually engaging effect. - **Customizable Color Palette**: Customize the gradient colors by providing an array of color values. - **Flexible Styling Options**: Adjust border width, border radius, and blur effect for a tailored look. - **Slot-Based Content**: Supports a default slot to easily add button content or icons. - **Smooth Animation Control**: Control the speed of the rotation using the `duration` prop. URL: https://inspira-ui.com/docs/zh-cn/components/buttons/interactive-hover-button --- title: Interactive Hover Button description: A visually engaging button component that responds to hover with dynamic transitions, adapting smoothly between light and dark modes for enhanced user interactivity. --- ```vue ``` ## 通过 CLI 安装 ```vue ``` ## 手动安装 复制并粘贴以下代码: ```vue ``` ## API | Prop 名称 | 类型 | 默认值 | 描述 | | --------- | -------- | -------- | ---------------------------------------------- | | `text` | `string` | `Button` | The text to be displayed inside the button. | | `class` | `string` | `""` | Additional class names to style the component. | ## 感谢 - Credits to [Whbbit1999](https://github.com/Whbbit1999) for this component. - Inspired and ported from [Magic UI Interactive Hover Button](https://magicui.design/docs/components/interactive-hover-button). URL: https://inspira-ui.com/docs/zh-cn/components/buttons/rainbow-button --- title: Rainbow Button description: A rainbow effect on button. --- ```vue ``` ## 通过 CLI 安装 ```vue ``` ## 手动安装 复制并粘贴以下代码: ```vue ``` ## API | Prop 名称 | 类型 | 默认值 | 描述 | | --------- | -------- | ---------- | ---------------------------------------------- | | `class` | `string` | `""` | Additional CSS classes to apply to the button. | | `is` | `string` | `"button"` | The HTML tag to render for the component. | | `speed` | `number` | `2` | Duration of the animation in seconds. | ## 感谢 - Credits to [Grzegorz Krol](https://github.com/Grzechu335) for porting this component. - Credits to [Magic UI](https://magicui.design/docs/components/rainbow-button). URL: https://inspira-ui.com/docs/zh-cn/components/buttons/ripple-button --- title: Ripple Button description: A stylish ripple button component with customizable colors and animation duration. --- ```vue ``` ## 通过 CLI 安装 ```vue ``` ## 手动安装 复制并粘贴以下代码: ```vue ``` ## API | Prop 名称 | 类型 | 默认值 | 描述 | | ------------- | -------- | ----------- | ------------------------------------------------- | | `class` | `string` | - | Additional CSS classes for custom styling. | | `rippleColor` | `string` | `"#ADD8E6"` | Color of the ripple effect. | | `duration` | `number` | `600` | Duration of the ripple animation in milliseconds. | ## Emits | Event Name | 类型 | Description | | ---------- | ------- | ----------- | | `click` | `event` | Click event | ## 感谢 - Inspired by [Magic UI's Ripple Button](https://magicui.design/docs/components/ripple-button) component. - Credits to [kalix127](https://github.com/kalix127) for porting this component. URL: https://inspira-ui.com/docs/zh-cn/components/buttons/shimmer-button --- title: Shimmer Button description: A button with a shimmering animated effect. --- ```vue ``` ## 通过 CLI 安装 ```vue ``` ## 手动安装 复制并粘贴以下代码: ```vue ``` ## API | Prop 名称 | 类型 | 默认值 | 描述 | | ----------------- | -------- | -------------------- | ------------------------------------------------------- | | `class` | `string` | `""` | Additional CSS classes to apply to the button. | | `shimmerColor` | `string` | `"#ffffff"` | Color of the shimmer effect. | | `shimmerSize` | `string` | `"0.05em"` | Size of the shimmer effect. | | `borderRadius` | `string` | `"100px"` | Border radius of the button. | | `shimmerDuration` | `string` | `"3s"` | Duration of the shimmer animation. | | `background` | `string` | `"rgba(0, 0, 0, 1)"` | Background color of the button. Can be rgb or hex code. | ## 功能特性 - **Shimmering Effect**: Displays a continuous shimmering animation on the button. - **Customizable Appearance**: Adjust shimmer color, size, duration, border radius, and background color. - **Slot Support**: Easily add any content inside the button using the default slot. - **Interactive States**: Includes hover and active states for enhanced user interaction. - **Responsive Design**: Adapts to different screen sizes and resolutions seamlessly. ## 感谢 - Ported from [Magic UI Shimmer Button](https://magicui.design/docs/components/shimmer-button). URL: https://inspira-ui.com/docs/zh-cn/components/cards/3d-card --- title: 3D效果卡片 description: 一个3D透视效果卡片,将鼠标悬停在卡片上以提升卡片元素。 --- ```vue ``` ::alert{type="warning"} This component uses the `nuxt-only` syntax with the ``. If you are not using Nuxt, you can simply remove it. :: ::alert{type="info"} If you are using `CardItem` inside a `div`, add `style="transform-style: preserve-3d;"` to the div to make `translate-z` prop to work. :: ## 通过 CLI 安装 ```vue ``` ## 手动安装 在同一个文件中,复制并粘贴以下代码: ::code-group :CodeViewerTab{filename="CardContainer.vue" language="vue" componentName="CardContainer" type="ui" id="card-3d"} :CodeViewerTab{filename="CardBody.vue" language="vue" componentName="CardBody" type="ui" id="card-3d"} :CodeViewerTab{filename="CardItem.vue" language="vue" componentName="CardItem" type="ui" id="card-3d"} ```ts [useMouseState.ts] import { ref, readonly } from "vue"; export function useMouseState() { const isMouseEntered = ref(false); function setMouseEntered(value: boolean) { isMouseEntered.value = value; } return { isMouseEntered: readonly(isMouseEntered), setMouseEntered, }; } ``` :: ## 示例 With rotation ```vue ``` ## API ### `CardContainer` The `CardContainer` component serves as a wrapper for the 3D card effect. It manages mouse events to create a 3D perspective. #### Props | Prop 名称 | 类型 | 默认值 | 描述 | | ---------------- | ------ | ------ | ----------------------------------------------------------- | | `class` | String | `null` | Additional classes for styling the inner container element. | | `containerClass` | String | `null` | Additional classes for styling the outer container element. | #### 用例 ```vue [MyCardComponent.vue] ``` ### `CardBody` The `CardBody` component is a flexible container with preserved 3D styling. It is intended to be used within a `CardContainer` to hold content with a 3D transformation effect. #### Props | Prop 名称 | 类型 | 默认值 | 描述 | | --------- | ------ | ------ | -------------------------------------- | | `class` | String | `null` | Additional classes for custom styling. | #### 用例 ```vue [MyCardComponent.vue] ``` ### `CardItem` The `CardItem` component represents individual items within the 3D card. It supports various transformations (translation and rotation) to create dynamic 3D effects. #### Props | Prop 名称 | 类型 | 默认值 | 描述 | | ------------ | ------------- | ------- | --------------------------------------------------------------- | | `as` | String | `"div"` | The HTML tag or component to use for the item. | | `class` | String | `null` | Additional classes for styling the item. | | `translateX` | Number/String | `0` | X-axis translation in pixels. | | `translateY` | Number/String | `0` | Y-axis translation in pixels. | | `translateZ` | Number/String | `0` | Z-axis translation in pixels, used to control the depth effect. | | `rotateX` | Number/String | `0` | X-axis rotation in degrees. | | `rotateY` | Number/String | `0` | Y-axis rotation in degrees. | | `rotateZ` | Number/String | `0` | Z-axis rotation in degrees. | #### 用例 ```vue [MyCardComponent.vue] Your text or content here ``` URL: https://inspira-ui.com/docs/zh-cn/components/cards/apple-card-carousel --- title: Apple Card Carousel description: A sleek, Apple‑style card carousel with blur‑loading images, modal expansion, and smooth scrolling controls. --- ```vue ``` ## Overview The **Apple Carousel** suite is composed of four inter‑related components: | Component | Purpose | | ------------------- | ------------------------------------------------------------------------ | | `AppleCardCarousel` | The horizontal scroll container with left / right controls. | | `AppleCarouselItem` | A wrapper that adds enter‑animation and spacing to each card. | | `AppleCard` | A richly styled, clickable card that can expand into a fullscreen modal. | | `AppleBlurImage` | An `` replacement that starts blurred until the image loads. | Together they reproduce the interactive “App Store / Apple TV” browsing experience. --- ## `AppleCardCarousel` | Prop | 类型 | 默认值 | 描述 | | --------------- | -------- | ------ | -------------------------------------------------- | | `initialScroll` | `number` | `0` | Horizontal scroll offset applied on mount (in px). | ### Slots The default slot should contain one or more **`AppleCarouselItem`** components. ### Emits _No custom events._ --- ## `AppleCarouselItem` | Prop | 类型 | Required | 描述 | | ------- | -------- | -------- | ------------------------------------------------------- | | `index` | `number` | ✓ | Zero‑based index; used to stagger the appear animation. | ### Slots Default slot — place an **`AppleCard`** here. --- ## `AppleCard` | Prop | 类型 | Required | 默认值 | 描述 | | -------- | -------------------------------------------------- | -------- | ------- | ------------------------------------- | | `card` | `{ src: string; title: string; category: string }` | ✓ | — | Data object for the card. | | `index` | `number` | ✓ | — | Position within the carousel. | | `layout` | `boolean` | ✕ | `false` | Enables shared‑layout FLIP animation. | ### Slots When the card is **expanded** (modal open) the default slot renders inside the modal body; you can inject extended content such as text, images, or videos. ### Emits _No custom events (relies on injected `CarouselKey` context)._ --- ## `AppleBlurImage` | Prop | 类型 | 默认值 | 描述 | | -------- | ------------------ | -------------------------------- | -------------------------------------------------------------- | | `src` | `string` | **—** | Image source URL. _Required._ | | `alt` | `string` | "Background of a beautiful view" | Alt text. | | `width` | `number \| string` | _img natural_ | Width attribute; omitted when using `fill`. | | `height` | `number \| string` | _img natural_ | Height attribute; omitted when using `fill`. | | `fill` | `boolean` | `false` | If `true`, sets `width:100%; height:100%` via utility classes. | | `class` | `string` | `""` | Additional classes merged via `cn()`. | When the image fires the native `load` event it gracefully transitions from `blur-sm` to no‑blur. --- ## 通过 CLI 安装 ```vue ``` ## 手动安装 在同一个文件中,复制并粘贴以下代码: ::code-group :CodeViewerTab{filename="AppleCardCarousel.vue" language="vue" componentName="AppleCardCarousel" type="ui" id="apple-card-carousel"} :CodeViewerTab{filename="AppleCarouselItem.vue" language="vue" componentName="AppleCarouselItem" type="ui" id="apple-card-carousel"} :CodeViewerTab{filename="AppleCard.vue" language="vue" componentName="AppleCard" type="ui" id="apple-card-carousel"} :CodeViewerTab{filename="AppleBlurImage.vue" language="vue" componentName="AppleBlurImage" type="ui" id="apple-card-carousel"} :CodeViewerTab{filename="AppleCarouselContext.ts" language="ts" componentName="AppleCarouselContext" type="ui" id="apple-card-carousel" extension="ts"} :: --- ## 功能特性 - **Blur‑Up Images** — Pleasant loading for card thumbnails. - **Shared Layout Animation** — Optional FLIP animation between thumbnail and modal using `layoutId`. - **Keyboard & Click Outside Close** — ⌘‑style modal dismissal (Esc key or outside click). - **Accessible Scrolling Controls** — Prev / next buttons with disabled state. - **Mobile‑Aware Scroll Calculations** — Ensures cards recentre correctly when closed on small screens. ## 感谢 - Ported from [Aceternity UI Apple Card Carousel](https://ui.aceternity.com/components/apple-cards-carousel). URL: https://inspira-ui.com/docs/zh-cn/components/cards/card-spotlight --- title: 聚光灯卡片 description: A card component with a dynamic spotlight effect that follows the mouse cursor, enhancing visual interactivity. --- ```vue ``` ## 通过 CLI 安装 ```vue ``` ## 手动安装 复制并粘贴以下代码: ```vue ``` ## API | Prop 名称 | 类型 | 默认值 | 描述 | | ----------------- | -------- | ----------- | ----------------------------------------------------------- | | `gradientSize` | `number` | `200` | Radius in pixels of the spotlight effect. | | `gradientColor` | `string` | `'#262626'` | The color of the spotlight gradient. | | `gradientOpacity` | `number` | `0.8` | The opacity level of the spotlight gradient effect. | | `slotClass` | `string` | `undefined` | Class to apply to the parent container containing the slot. | ## 功能特性 - **Interactive Spotlight Effect**: Displays a dynamic spotlight that follows the user's mouse cursor, enhancing user engagement and visual appeal. - **Customizable Appearance**: Easily adjust the `gradientSize`, `gradientColor`, and `gradientOpacity` props to tailor the spotlight effect to your design preferences. - **Easy Integration**: Wrap any content within the `` component to instantly add the spotlight effect without additional configuration. - **Responsive Design**: The component adapts smoothly to different container sizes, ensuring a consistent experience across various devices and screen sizes. - **Performance Optimized**: Utilizes Vue's reactivity for efficient updates, ensuring smooth animations without compromising application performance. ## 感谢 - Inspired by Magic Card component from [Magic UI](https://magicui.design/docs/components/magic-card). URL: https://inspira-ui.com/docs/zh-cn/components/cards/direction-aware-hover --- title: Direction Aware Hover description: A direction aware hover card, that displays an image with dynamic hover effects and customizable content overlay. --- ```vue ``` ## 通过 CLI 安装 ```vue ``` ## 手动安装 复制并粘贴以下代码: ```vue ``` ## API | Prop 名称 | 类型 | 默认值 | 描述 | | --------------- | -------- | ----------- | ----------------------------------------------- | | `imageUrl` | `string` | Required | The URL of the image to be displayed. | | `class` | `string` | `undefined` | Additional CSS classes for the card container. | | `imageClass` | `string` | `undefined` | Additional CSS classes for the image element. | | `childrenClass` | `string` | `undefined` | Additional CSS classes for the content overlay. | ## 感谢 - Credits to [M Atif](https://github.com/atif0075) for porting this component. - Ported from [Aceternity UI's Direction Aware Hover](https://ui.aceternity.com/components/direction-aware-hover) URL: https://inspira-ui.com/docs/zh-cn/components/cards/flip-card --- title: 翻转卡片 description: A dynamic flip card with smooth 180-degree flipping animations along both the X and Y axes, providing an engaging and interactive visual effect. --- ```vue ``` ## 通过 CLI 安装 ```vue ``` ## 手动安装 复制并粘贴以下代码: ```vue ``` ## 示例 ### Horizontal Flip ```vue ``` ## API | Prop 名称 | 类型 | 默认值 | 描述 | | --------- | -------- | ------ | ------------------------------------------ | | `class` | `string` | `-` | The class to be applied to the component. | | `rotate` | `x \| y` | `y` | You can pass the rotate value as you want. | | Slot Name | 描述 | | --------- | --------------------------- | | `default` | Component to show as front. | | `back` | Component to show as back. | ## 感谢 - Credits to [SivaReddy Uppathi](https://github.com/sivareddyuppathi) for this component. URL: https://inspira-ui.com/docs/zh-cn/components/cards/glare-card --- title: Glare Card description: A glare effect that happens on hover, as seen on Linear's website. --- ```vue ``` ## 通过 CLI 安装 ```vue ``` ## 手动安装 复制并粘贴以下代码: ```vue ``` ## 示例 ### Multiple Cards ```vue ``` ## API | Prop 名称 | 类型 | 默认值 | 描述 | | --------- | -------- | ------ | --------------------------------------------------------- | | `class` | `string` | `-` | Additional Tailwind CSS class names to apply to the card. | ## 功能特性 - **Slot Support**: Easily add any content inside the component using the default slot. ## 感谢 - Credits to [SivaReddy Uppathi](https://github.com/sivareddyuppathi) for this component. - Inspired from [Aceternity UI](https://ui.aceternity.com/components/glare-card). URL: https://inspira-ui.com/docs/zh-cn/components/cursors/fluid-cursor --- title: 流体光标 description: 一个模拟流体运动的GPU加速动画光标轨迹。 --- ```vue ``` ## API 接口 | 属性名 | 类型 | 默认值 | 描述 | | --------------------- | --------- | ------------------------ | ---------------------------------------------------------------------------------- | | `simResolution` | `number` | `128` | 模拟网格的分辨率,影响流体细节和性能。 | | `dyeResolution` | `number` | `1440` | 流体染料(颜色)纹理的分辨率。 | | `captureResolution` | `number` | `512` | 捕获输入事件的分辨率。 | | `densityDissipation` | `number` | `3.5` | 颜色密度随时间消散的速率。 | | `velocityDissipation` | `number` | `2` | 速度随时间衰减的速率,影响流体动量保持性。 | | `pressure` | `number` | `0.1` | 流体物理计算中使用的压力系数。 | | `pressureIterations` | `number` | `20` | 压力求解器精度的迭代次数。 | | `curl` | `number` | `3` | 增强涡旋运动的涡量/旋度效应强度。 | | `splatRadius` | `number` | `0.2` | 指针在流体中的溅射效果半径。 | | `splatForce` | `number` | `6000` | 指针在交互时对流体施加的力。 | | `shading` | `boolean` | `true` | 启用或禁用流体颜色上深度和光照的阴影效果。 | | `colorUpdateSpeed` | `number` | `10` | 指针颜色动态更新的速度。 | | `backColor` | `object` | `{ r: 0.5, g: 0, b: 0 }` | 流体的背景颜色,以RGB格式表示。 | | `transparent` | `boolean` | `true` | 画布背景是否透明。 | | `class` | `string` | `undefined` | 外部容器div的额外CSS类。 | ## 使用CLI安装 ```vue ``` ## 手动安装 Copy and paste the following code: ```vue ``` ## 特性 - **基于GPU的流体模拟**:使用WebGL着色器实现平滑且性能优异的流体动力学。 - **指针交互**:流体能够动态响应鼠标和触摸输入,产生五彩斑斓的溅射效果。 - **自定义物理**:可调节模拟分辨率、压力、卷曲和耗散参数。 - **阴影效果**:可选的照明/阴影,以增强3D流体外观。 - **响应式画布**:自动调整大小并适应设备像素比,以获得清晰的视觉效果。 - **背景控制**:支持透明或纯色背景。 ## 致谢 - 灵感来自 [Fluid Cursor by Cursify](https://cursify.vercel.app/components/fluid-cursor) - 利用 WebGL 1/2 上下文和自定义 GLSL 着色器进行流体物理和渲染。 URL: https://inspira-ui.com/docs/zh-cn/components/cursors/image-trail-cursor --- title: 图片轨迹光标 description: 一个交互式光标效果,创建动态的图片轨迹,跟随鼠标移动,支持多种动画变体。 navBadges: - value: 新 type: lime --- ```vue ``` ## API 接口 | 属性名 | 类型 | 默认值 | 描述 | | --------- | ------------- | --------- | ------------------------------------------- | | `images` | `string[]` | `[]` | 用于轨迹效果显示的一组图片 URL。 | | `variant` | `VariantType` | `"type1"` | 动画变体类型(从 `"type1"` 到 `"type7"`)。 | > 💡 该组件创建一个全宽全高的容器,拥有较高的 z-index 用于光标跟踪。每张图片宽度为190px,宽高比为1.1,带有圆角。 ## 使用 CLI 安装 ```vue ``` ## 手动安装 ::code-group ::CodeViewerTab{label="ImageTrailCursor.vue" language="vue" componentName="ImageTrailCursor" type="ui" id="image-trail-cursor"} :: ::CodeViewerTab{label="trail-variants.ts" language="typescript" componentName="trail-variants" language="ts" type="ui" id="image-trail-cursor" extension="ts"} :: :: ## 特性 - **多种动画变体**:提供7种不同的轨迹动画样式和行为选择。 - **动态图片渲染**:平滑过渡图片的不透明度和变换效果。 - **响应式设计**:图片自动缩放,带圆角并处理溢出显示。 - **内存管理**:变体切换时自动销毁并重建实例,防止内存泄漏。 - **性能优化**:使用 `will-change` CSS 属性,实现流畅的 GPU 加速动画。 - **灵活的图片支持**:接受任意数组的图片 URL,支持自定义视觉内容。 ## 注意事项 - 组件使用变体系统,动画类在 `trail-variants.ts` 中映射。 - 图片采用绝对定位,带有轻微溢出效果(尺寸大20px,偏移-10px),以实现更流畅的视觉过渡。 - 容器保持较高的 z-index(100),确保轨迹效果显示在其他内容之上。 - 在组件卸载和变体切换时,正确清理实例,避免内存泄漏。 ## 致谢 - 灵感来自现代光标轨迹效果和图片悬停交互。 - 基于 Vue 3 组合式 API 构建,实现最佳响应性和性能。 - 移植自 [Codrops 文章](https://tympanus.net/codrops/2023/10/18/ideas-for-image-motion-trail-animations/) URL: https://inspira-ui.com/docs/zh-cn/components/cursors/sleek-line-cursor --- title: Sleek Line Cursor description: 使用弹簧物理和动态色彩波动,实现顺滑波浪动画效果的响应式光标拖尾组件。 navBadges: - value: 新 type: lime --- ```vue ``` ## API | 属性名 | 类型 | 默认值 | 描述 | | ----------- | -------------------- | ----------- | ---------------------------------------------------- | | `class` | `string \| string[]` | `undefined` | 用于设置 canvas 容器的额外 CSS 类名。 | | `trails` | `number` | `20` | 拖尾线的数量,每条线都跟随光标移动。 | | `size` | `number` | `50` | 每条拖尾线中由弹簧连接的节点数量。 | | `friction` | `number` | `0.5` | 全局摩擦力,影响速度衰减。 | | `dampening` | `number` | `0.25` | 邻近节点之间的速度阻尼因子。 | | `tension` | `number` | `0.98` | 控制拖尾末端的弹性衰减,使拖尾逐渐变细,模拟流体感。 | > 💡 此组件默认使用 `pointer-events-none` 并全屏固定显示。你可以通过 `class` 属性扩展或覆盖其样式。 ## 使用 CLI 安装 ```vue ``` ## 手动安装 ```vue ``` ## 功能特性 - **基于弹簧的动画**:拖尾线条使用弹簧物理与速度传播算法紧随光标。 - **颜色波动动态**:基于正弦波的色相变化,实现平滑的颜色过渡效果。 - **触控支持**:支持鼠标与触控操作,响应流畅。 - **轻量高效**:基于原生 `` 实现,无需外部依赖。 - **自动响应式画布**:窗口或设备方向变动时自动调整大小。 - **自定义样式**:可通过 Tailwind 或自定义 CSS 轻松扩展样式。 ## 致谢 - 基于 [Cursify 的 Canvas Cursor](https://cursify.vercel.app/components/canvas-cursor) 项目移植而来。 URL: https://inspira-ui.com/docs/zh-cn/components/cursors/smooth-cursor --- title: Smooth Cursor description: A customizable, physics-based smooth cursor animation component for Vue applications. --- ```vue ``` ::alert{type="warning"} This component uses the `nuxt-only` syntax with the ``. If you are not using Nuxt, you can simply remove it. :: ## 通过 CLI 安装 ```vue ``` ## 手动安装 复制并粘贴以下代码: ::code-group ::CodeViewer{filename="SmoothCursor.vue" language="vue" componentName="SmoothCursor" type="ui" id="smooth-cursor"} :: ```vue ``` :: ## API | Prop 名称 | 类型 | 默认值 | 描述 | | -------------- | -------------- | --------------- | ------------------------------------------------------- | | `cursor` | `Component` | `DefaultCursor` | Custom cursor component to replace the default cursor | | `springConfig` | `SpringConfig` | `See below` | Configuration object for the spring animation behavior. | ### SpringConfig Type ```ts interface springConfig { damping: number; stiffness: number; mass: number; restDelta: number; } ``` ### Default SpringConfig Configuration ```ts const defaultSpringConfig = { damping: 45, stiffness: 400, mass: 1, restDelta: 0.001, }; ``` ## Browser Support Compatible with all modern browsers that support: - `requestAnimationFrame` - CSS transforms - Pointer events ## Accessibility When using this component, consider that: - Users navigating via keyboard will not see the custom cursor - You may want to provide alternative visual cues for interactive elements - Some users may have motion sensitivity, so consider providing a way to disable the animation ## 功能特性 - 🎯 Smooth physics-based cursor animations - 🔄 Rotation effects based on movement direction - ⚡ Performance optimized with RAF - 🎨 Fully customizable cursor design - 📦 Lightweight and easy to implement ## 感谢 - Credits to [Whbbit1999](https://github.com/Whbbit1999) for this component. - Ported from [Magic UI Smooth Cursor](https://magicui.design/docs/components/smooth-cursor). URL: https://inspira-ui.com/docs/zh-cn/components/cursors/tailed-cursor --- title: Tailed Cursor description: A smooth, colorful ribbon cursor trail rendered with WebGL using OGL, featuring dynamic shaders and customizable animation effects. --- ```vue ``` ## API | Prop Name | Type | Default | Description | | -------------------- | ---------- | ---------------------------------------------- | ------------------------------------------------------------ | | `colors` | `string[]` | `["#ff9346", "#7cff67", "#ffee51", "#00d8ff"]` | Array of colors for each tail ribbon. | | `baseSpring` | `number` | `0.03` | Spring strength for tail movement responsiveness. | | `baseFriction` | `number` | `0.9` | Friction factor slowing down the tail movement. | | `baseThickness` | `number` | `30` | Base thickness of the tail ribbons. | | `offsetFactor` | `number` | `0.05` | Horizontal offset factor between each ribbon line. | | `maxAge` | `number` | `500` | Maximum age for tail segments controlling their fade timing. | | `pointCount` | `number` | `50` | Number of points composing each ribbon tail. | | `speedMultiplier` | `number` | `0.6` | Speed multiplier controlling the animation speed. | | `enableFade` | `boolean` | `false` | Enables fading effect on tail edges. | | `enableShaderEffect` | `boolean` | `false` | Enables dynamic shader wave effect on ribbons. | | `effectAmplitude` | `number` | `2` | Amplitude of the shader wave effect when enabled. | | `backgroundColor` | `number[]` | `[0, 0, 0, 0]` | RGBA background clear color for the WebGL canvas. | ## Installation This component requires the **OGL** library for WebGL rendering. ::pm-install{name="ogl"} :: ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code: ```vue ``` ## Features - **WebGL-powered tails**: High-performance smooth trailing ribbons following the cursor. - **Multi-color ribbons**: Multiple colored tails with customizable colors and offsets. - **Dynamic shaders**: Optional shader-based waving effects and fade transitions. - **Responsive and adaptive**: Automatically resizes with container and supports touch input. - **Customizable physics**: Adjustable spring, friction, thickness, and speed for fine-tuned motion. - **Lightweight integration**: Minimal external dependencies, easy to integrate in Vue 3 apps. ## Credits - Built with [OGL](https://github.com/oframe/ogl), a lightweight WebGL framework. - Inspired from [Codrops Article](https://tympanus.net/codrops/2019/09/24/crafting-stylised-mouse-trails-with-ogl/) URL: https://inspira-ui.com/docs/zh-cn/components/device-mocks/iphone-mockup --- title: iPhone 模拟 description: iPhone手机的SVG模型。 --- ```vue ``` ## 通过 CLI 安装 ```vue ``` ## 手动安装 复制并粘贴以下代码: ```vue ``` ## API | Prop 名称 | 类型 | 默认值 | 描述 | | --------- | -------- | ------ | ---------------------------------------------- | | `width` | `number` | `433` | Width of the mockup SVG in pixels. | | `height` | `number` | `882` | Height of the mockup SVG in pixels. | | `src` | `string` | `null` | URL of the image to display inside the mockup. | ## 功能特性 - **Realistic iPhone 15 Pro Mockup**: Provides an accurate SVG representation of the iPhone 15 Pro, perfect for showcasing mobile app designs or website previews. - **Customizable Dimensions**: Adjust the `width` and `height` props to fit your specific design requirements. - **Image Display Support**: Use the `src` prop to insert any image into the mockup screen area, allowing for dynamic content display. - **Light and Dark Mode Compatibility**: The mockup adapts its colors based on the theme, ensuring consistency in both light and dark modes. - **Easy Integration**: Simple to include in your Vue projects with minimal setup. ## 感谢 - Ported from [Magic UI](https://magicui.design/docs/components/iphone-15-pro). URL: https://inspira-ui.com/docs/zh-cn/components/device-mocks/safari-mockup --- title: Safari 模拟 description: Safari浏览器的SVG模型。 --- ```vue ``` ## 通过 CLI 安装 ```vue ``` ## 手动安装 复制并粘贴以下代码: ```vue ``` ## API | Prop 名称 | 类型 | 默认值 | 描述 | | --------- | -------- | ------ | ---------------------------------------------- | | `url` | `string` | `null` | URL displayed in the mockup's address bar. | | `src` | `string` | `null` | URL of the image to display inside the mockup. | | `width` | `number` | `1203` | Width of the mockup SVG in pixels. | | `height` | `number` | `753` | Height of the mockup SVG in pixels. | ## 功能特性 - **Realistic Safari Browser Mockup**: Provides an SVG representation of the Safari browser window, ideal for showcasing website designs. - **Customizable Dimensions**: Adjust the `width` and `height` props to fit your specific needs. - **Address Bar URL Display**: Use the `url` prop to display a custom URL in the mockup's address bar. - **Image Display Support**: Use the `src` prop to insert any image into the mockup's content area. - **Light and Dark Mode Compatibility**: The mockup adapts its colors based on the theme. ## 感谢 - Ported from [Magic UI](https://magicui.design/docs/components/safari). URL: https://inspira-ui.com/docs/zh-cn/components/index --- title: 组件索引 description: Inspira UI提供的所有组件列表。 navigation: false --- ::NewComponentsMarquee :: ## 所有组件 ::ComponentIndex :: URL: https://inspira-ui.com/docs/zh-cn/components/input-and-forms/file-upload --- title: 文件上传 description: A modern file upload component with a 3D card effect, drag-and-drop functionality, and a responsive grid background pattern. --- ```vue ``` ::alert{type="warning"} This component uses the `nuxt-only` syntax with the ``. If you are not using Nuxt, you can simply remove it. :: ## 通过 CLI 安装 ```vue ``` ## 手动安装 在同一个文件中,复制并粘贴以下代码: ::code-group :CodeViewerTab{label="FileUpload.vue" language="vue" componentName="FileUpload" type="ui" id="file-upload"} :CodeViewerTab{label="FileUploadGrid.vue" language="vue" componentName="FileUploadGrid" type="ui" id="file-upload"} :: ## API ### `FileUpload` The `FileUpload` component serves as a wrapper for the file upload effect. It manages mouse events to create a 3D perspective. #### Props | Prop 名称 | 类型 | 默认值 | 描述 | | --------- | ------ | ------ | ----------------------------------------------------- | | `class` | String | - | Additional classes for styling the container element. | #### Emits | Event Name | 类型 | 描述 | | ---------- | ------------------------- | ---------------------------------------------------------- | | `onChange` | `(files: File[]) => void` | Callback function triggered when files are added/uploaded. | #### 用例 ```vue [MyComponent.vue] ``` ### `FileUploadGrid` The `FileUploadGrid` component provides the background grid pattern for the file upload area. It is intended to be used within a `FileUpload` component to create the visual grid effect behind the upload interface. #### Props | Prop 名称 | 类型 | 默认值 | 描述 | | --------- | ------ | ------ | -------------------------------------- | | `class` | String | - | Additional classes for custom styling. | #### 用例 ```vue [MyComponent.vue] ``` ## 感谢 - Credits to [kalix127](https://github.com/kalix127) for porting this component. - Inspired by [AcernityUI](https://ui.aceternity.com/components/file-upload). URL: https://inspira-ui.com/docs/zh-cn/components/input-and-forms/halo-search --- title: Halo 搜索 description: 一款未来感十足的搜索输入组件,拥有多重发光环与细腻的动态光晕,为界面带来炫彩、沉浸式体验。 --- ```vue ``` ## API | 属性名 | 类型 | 默认值 | 描述 | | ------- | -------- | ------ | ----------------------- | | `class` | `string` | `""` | 根容器的附加 CSS 类名。 | ## 安装 除 Vue 3 和你的图标系统(用于搜索图标)外,无需额外依赖。 ## CLI 安装 ```vue ``` ## 手动安装 复制并粘贴以下代码 ```vue ``` ## 特色功能 - **发光环**:多层锥形渐变环,带有流畅的旋转动画。 - **极光光晕**:大面积模糊渐变背景,营造环境光晕效果。 - **内外光效**:细腻模糊覆盖层,增强深度与聚焦感。 - **动画搜索按钮**:渐变圆环和无限旋转的搜索图标高光。 - **响应式输入框**:干净、暗色主题的搜索输入,支持自定义占位符样式。 - **交互状态**:悬停和聚焦时,环形旋转与光晕强度动态反馈。 - **作用域样式**:封装 CSS,保证样式隔离和平滑过渡。 ## 使用场景 - 可作为仪表盘、音乐/视频应用、创意作品集等的炫酷搜索栏。 - 集成到落地页,为用户留下带动画的深刻第一印象。 - 结合深色或弱光主题界面,放大光环特效的视觉冲击。 - 在 CSS 中自定义光晕色彩与动画时长,适配品牌色或节日氛围。 - 可扩展支持键盘导航、搜索自动补全,提升可访问性。 ## 致谢 - 设计灵感源自未来主义 UI 概念和现代网页/应用中流行的环境光效。 - 灵感部分来自 UiVerse Search input challenge。 URL: https://inspira-ui.com/docs/zh-cn/components/input-and-forms/input --- title: 输入 description: A versatile and visually dynamic input field with radial hover effects, styled for modern web applications. --- ```vue ``` ## 通过 CLI 安装 ```vue ``` ## 手动安装 复制并粘贴以下代码: ```vue ``` ## API | Prop 名称 | 类型 | 默认值 | 描述 | | ---------------- | ------------------- | ------ | ----------------------------------------------------------- | | `defaultValue` | `string \| number` | `""` | 默认值 value of the input field. | | `class` | `string` | `""` | Additional CSS classes for custom styling. | | `containerClass` | `string` | `""` | Additional CSS classes for custom styling of the container. | ## 功能特性 - **Radial Hover Effect**: Displays a dynamic radial gradient background that follows mouse movements when hovering over the input container. - **Two-Way Binding**: Supports `v-model` for seamless integration with Vue's two-way data binding. - **Dark Mode Compatibility**: Automatically adapts to dark mode styles using Tailwind's `dark:` utilities. - **Customizable Styles**: Easily extend or override styles using the `class` prop. - **Accessible Focus Ring**: Includes focus-visible styles for enhanced accessibility and usability. - **Responsive Design**: Works well across different screen sizes and devices. ## Styles This component inherits base styles from ShadCN Vue’s Input component and applies additional functionality, including hover effects and shadow styling. ## 感谢 - Built on ShadCN Vue's Input component foundation, with extended functionality for modern UI/UX needs. - Ported from [Aceternity UI's Signup Form Input Component](https://ui.aceternity.com/components/signup-form) URL: https://inspira-ui.com/docs/zh-cn/components/input-and-forms/placeholders-and-vanish-input --- title: Placeholders And Vanish Input description: Sliding in placeholders and vanish effect of input on submit --- ```vue ``` ## 通过 CLI 安装 ```vue ``` ## 手动安装 复制并粘贴以下代码: ```vue ``` ## API | Prop 名称 | 类型 | 默认值 | 描述 | | -------------- | --------------- | ----------------------------------------------------- | ------------------------------------------------------------------------------- | | `placeholders` | `Array` | `["Placeholder 1", "Placeholder 2", "Placeholder 3"]` | An array of placeholder texts that cycle through as prompts in the input field. | This component listens to the following events emitted by the `VanishingInput` component: | Event Name | Parameters | 描述 | | ---------- | ---------- | --------------------------------------- | | `change` | `Event` | Triggered when the input value changes. | | `submit` | `string` | Triggered when the input is submitted. | ## 感谢 - Credits to [M Atif](https://github.com/atif0075) for porting this component. - Ported from [Aceternity UI's Placeholders And Vanish Input](https://ui.aceternity.com/components/placeholders-and-vanish-input). URL: https://inspira-ui.com/docs/zh-cn/components/miscellaneous/animate-grid --- title: Animate Grid description: Skew Animation grid with box shadow. --- ```vue ``` ## 通过 CLI 安装 ```vue ``` ## 手动安装 ::steps{level=4} 复制并粘贴以下代码: ::CodeViewer{filename="AnimateGrid.vue" language="vue" componentName="AnimateGrid" type="ui" id="animate-grid"} :: #### Add SVG file Add at least one SVG file to the same folder as your component and update the import in your component to use it :: ## API | Prop 名称 | 类型 | 默认值 | 描述 | | -------------------- | -------- | ------------------- | --------------------------------------------------- | | `textGlowStartColor` | `string` | `"#38ef7d80"` | Color of the box shadow start. | | `textGlowEndColor` | `string` | `"#38ef7d"` | Color of the box shadow end. | | `perspective` | `number` | `600` | You can pass perspective to transform CSS property. | | `rotateX` | `number` | `-1` | You can pass rotateX to transform CSS property. | | `rotateY` | `number` | `-15` | You can pass rotateY to transform CSS property. | | `cards` | `[]` | `"[{logo: 'src'}]"` | Cards to display in grid. | | `class` | `string` | `""` | Additional tailwind CSS classes for custom styling. | ## 功能特性 - **Slot-Based Content**: Supports a default slot to add content inside the Animate Grid container. ## 感谢 - Thanks to [SivaReddy Uppathi](https://github.com/sivareddyuppathi) for providing this component. URL: https://inspira-ui.com/docs/zh-cn/components/miscellaneous/animated-circular-progressbar --- title: Animated Circular Progress Bar description: Animated Circular Progress Bar is a component that displays a circular gauge with a percentage value. --- ```vue ``` ## 通过 CLI 安装 ```vue ``` ## 手动安装 复制并粘贴以下代码: ```vue ``` ## API | Prop 名称 | 类型 | 默认值 | 描述 | | --------------------- | --------- | -------------------- | ------------------------------------------- | | `class` | `string` | `-` | The class to be applied to the component. | | `max` | `number` | `100` | The maximum value of the gauge. | | `min` | `number` | `0` | The minimum value of the gauge. | | `value` | `number` | `0` | The current value of the gauge. | | `gaugePrimaryColor` | `string` | `rgb(79 70 229)` | The primary color of the gauge. | | `gaugeSecondaryColor` | `string` | `rgba(0, 0, 0, 0.1)` | The secondary color of the gauge. | | `circleStrokeWidth` | `number` | `10` | The width of the circle progress bar. | | `showPercentage` | `boolean` | `true` | Show the value inside the circle | | `duration` | `number` | `1` | The duration of the animation (in seconds). | ## 感谢 - Credits to [Magic UI](https://magicui.design/docs/components/animated-circular-progress-bar). - Credits to [SivaReddy Uppathi](https://github.com/sivareddyuppathi) for porting this component. URL: https://inspira-ui.com/docs/zh-cn/components/miscellaneous/animated-list --- title: Animated List description: A sequentially animated list that introduces each item with a timed delay, perfect for displaying notifications or events on your landing page. --- ```vue ``` ## 通过 CLI 安装 ```vue ``` ## 手动安装 在同一个文件中,复制并粘贴以下代码: ::code-group :CodeViewerTab{label="AnimatedList.vue" language="vue" componentName="AnimatedList" type="ui" id="animated-list"} :CodeViewerTab{label="Notification.vue" language="vue" componentName="Notification" type="ui" id="animated-list"} :: ## API | Prop 名称 | 类型 | 默认值 | 描述 | | --------- | -------- | ------ | -------------------------------------------------------------- | | `delay` | `number` | `1` | The delay in milliseconds before adding each item to the list. | ## 功能特性 - **Animated Item Loading**: Items are added to the list one by one with a configurable delay. - **Smooth Transitions**: Each item animates in with a spring effect on entry and a smooth scale and opacity animation on exit. - **Reverse Order**: Items are displayed in reverse order (newest at the top) for a dynamic, engaging user experience. - **Flexibility**: You can pass different components as items, making it highly versatile. ## 感谢 - Inspired by [Magic UI](https://magicui.design/docs/components/animated-list). URL: https://inspira-ui.com/docs/zh-cn/components/miscellaneous/animated-testimonials --- title: Animated Testimonials description: An engaging and animated testimonial component showcasing user feedback with transitions and auto-play functionality. --- ```vue ``` ## API | Prop 名称 | 类型 | 默认值 | 描述 | | -------------- | --------------- | ------- | ---------------------------------------------------------------------------------------------- | | `testimonials` | `Testimonial[]` | `[]` | An array of testimonial objects containing quote, name, image, and designation. | | `autoplay` | `boolean` | `false` | Whether to cycle through testimonials automatically. | | `duration` | `number` | `5000` | Duration (in milliseconds) to wait before automatically transitioning to the next testimonial. | ### Testimonial Object Each testimonial object must contain the following fields: | Property | 类型 | 描述 | | ------------- | -------- | ----------------------------------------------------------------- | | `quote` | `string` | The testimonial text. | | `name` | `string` | The name of the person or entity providing the testimonial. | | `designation` | `string` | The position or role of the testimonial author (e.g., CEO, user). | | `image` | `string` | URL of the image or avatar for the testimonial author. | ## 通过 CLI 安装 ```vue ``` ## 手动安装 You can 复制并粘贴以下代码: to create this component: ```vue ``` ## 功能特性 - **Animated Slides**: Utilizes Motion-V to animate transitions between testimonials. - **Auto-Play Support**: Automatically transitions to the next testimonial after a specified duration. - **Random Rotation Effects**: Adds a subtle randomized rotation for each new slide. - **Navigation Buttons**: Manually cycle through testimonials using previous and next controls. - **Responsive and Modular**: Adapts well to different screen sizes, allowing easy integration into various layouts. ## 感谢 - Ported from (Aceternity UI Animated Testimonials)[https://ui.aceternity.com/components/animated-testimonials]. URL: https://inspira-ui.com/docs/zh-cn/components/miscellaneous/animated-tooltip --- title: Animated Tooltip description: A cool tooltip that reveals on hover, follows mouse pointer --- ```vue ``` ## 通过 CLI 安装 ```vue ``` ## 手动安装 复制并粘贴以下代码: ```vue ``` ## API | Prop 名称 | 类型 | 默认值 | 描述 | | --------- | ----------------------------------------------------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------- | | `items` | `Array<{id: number, name: string, designation: string, image: string}>` | `[]` | An array of objects, each representing an item. Each object in the array should have the following properties: id, name, designation, image | ## 感谢 - Credits to [M Atif](https://github.com/atif0075) for this component. - Inspired from [Aceternity UI's Animated Tooltip](https://ui.aceternity.com/components/animated-tooltip). URL: https://inspira-ui.com/docs/zh-cn/components/miscellaneous/balance-slider --- title: Balance Slider description: A dynamic balance slider with adjustable colors, limits, and interactive tooltip. --- ```vue ``` ## 通过 CLI 安装 ```vue ``` ## 手动安装 复制并粘贴以下代码: ```vue ``` ## API | Prop 名称 | 类型 | 默认值 | 描述 | | ---------------- | -------- | ----------- | --------------------------------------------------- | | `initialValue` | `number` | `50` | Initial position of the slider (0-100). | | `leftColor` | `string` | `"#e68a00"` | Background color for the left side of the slider. | | `rightColor` | `string` | `"#ffffff"` | Background color for the right side of the slider. | | `minShiftLimit` | `number` | `40` | Minimum limit where shifting animation activates. | | `maxShiftLimit` | `number` | `68` | Maximum limit where shifting animation deactivates. | | `leftContent` | `string` | `"LEFT"` | Text displayed in the tooltip for the left side. | | `rightContent` | `string` | `"RIGHT"` | Text displayed in the tooltip for the right side. | | `indicatorColor` | `string` | `"#FFFFFF"` | Color of the central indicator on the slider. | ## 功能特性 - **Dual-Sided Color Control**: Customize the left and right side colors of the slider to create a distinct balance effect. - **Interactive Tooltip**: Displays real-time percentage values for both sides, with customizable content for left and right labels. - **Shift Animation**: Activates a shifting effect within defined limits, adding an engaging visual element. - **Responsive Indicator**: Central indicator adjusts its color based on active state, enhancing interactivity. - **Accessible Controls**: Works with keyboard and touch interactions for seamless accessibility. ## 感谢 - Inspired and ported from code shared in [Jhey's CSS only version of Balance Slider](https://x.com/jh3yy/status/1748809599598399792?s=46) - Original concept by [Malay Vasa](https://x.com/MalayVasa/status/1748726374079381930). URL: https://inspira-ui.com/docs/zh-cn/components/miscellaneous/bento-grid --- title: Bento Grid description: A cool grid layout with different child component. --- ```vue ``` ## 通过 CLI 安装 ```vue ``` ## 手动安装 在同一个文件中,复制并粘贴以下代码: ::code-group :CodeViewerTab{label="BentoGrid.vue" language="vue" componentName="BentoGrid" type="ui" id="bento-grid"} :CodeViewerTab{label="BentoGridCard.vue" language="vue" componentName="BentoGridCard" type="ui" id="bento-grid"} :CodeViewerTab{label="BentoGridItem.vue" language="vue" componentName="BentoGridItem" type="ui" id="bento-grid"} :: ## 示例 `BentoGrid` in MagicUI style. ```vue ``` ## API #### `BentoGridItem` | Slot Name | 描述 | | ------------- | --------------------------------- | | `title` | Component to show as title. | | `description` | Component to show as description. | | `icon` | Component to show as icon. | | `header` | Component to show as header. | #### `BentoGridCard` | Slot Name | 描述 | | ------------ | -------------------------------- | | `background` | Component to show in background. | | Props Name | 类型 | 描述 | | ------------- | --------- | ------------------------------------ | | `name` | `string` | Name or title to show on card. | | `icon` | `?string` | Icon component to show on card. | | `description` | `string` | Description content to show on card. | | `href` | `string` | Link to the url for CTA. | | `cta` | `string` | Text to show on CTA. | ## 感谢 - Credits to [Aceternity UI](https://ui.aceternity.com/components/bento-grid) and [Magic UI](https://magicui.design/docs/components/bento-grid) for this fantastic component. URL: https://inspira-ui.com/docs/zh-cn/components/miscellaneous/book --- title: 3D书本 description: A 3D book component featuring customizable sizes and color gradients. --- ```vue ``` ## 通过 CLI 安装 ```vue ``` ## 手动安装 在同一个文件中,复制并粘贴以下代码: ::code-group :CodeViewerTab{label="Book.vue" language="vue" componentName="Book" type="ui" id="book"} :CodeViewerTab{label="BookHeader.vue" language="vue" componentName="BookHeader" type="ui" id="book"} :CodeViewerTab{label="BookTitle.vue" language="vue" componentName="BookTitle" type="ui" id="book"} :CodeViewerTab{label="BookDescription.vue" language="vue" componentName="BookDescription" type="ui" id="book"} ```ts [index.ts] export const BOOK_RADIUS_MAP = { sm: "rounded-sm", md: "rounded-md", lg: "rounded-lg", xl: "rounded-xl", } as const; export const BOOK_SIZE_MAP = { sm: { width: "180px", spineTranslation: "152px" }, md: { width: "220px", spineTranslation: "192px" }, lg: { width: "260px", spineTranslation: "232px" }, xl: { width: "300px", spineTranslation: "272px" }, } as const; export const BOOK_SHADOW_SIZE_MAP = { sm: "-5px 0 15px 5px var(--shadowColor)", md: "-7px 0 25px 7px var(--shadowColor)", lg: "-10px 0 35px 10px var(--shadowColor)", xl: "-12px 0 45px 12px var(--shadowColor)", } as const; export const BOOK_COLOR_MAP = { slate: { from: "from-slate-900", to: "to-slate-700" }, gray: { from: "from-gray-900", to: "to-gray-700" }, zinc: { from: "from-zinc-900", to: "to-zinc-700" }, neutral: { from: "from-neutral-900", to: "to-neutral-700" }, stone: { from: "from-stone-900", to: "to-stone-700" }, red: { from: "from-red-900", to: "to-red-700" }, orange: { from: "from-orange-900", to: "to-orange-700" }, amber: { from: "from-amber-900", to: "to-amber-700" }, yellow: { from: "from-yellow-900", to: "to-yellow-700" }, lime: { from: "from-lime-900", to: "to-lime-700" }, green: { from: "from-green-900", to: "to-green-700" }, emerald: { from: "from-emerald-900", to: "to-emerald-700" }, teal: { from: "from-teal-900", to: "to-teal-700" }, cyan: { from: "from-cyan-900", to: "to-cyan-700" }, sky: { from: "from-sky-900", to: "to-sky-700" }, blue: { from: "from-blue-900", to: "to-blue-700" }, indigo: { from: "from-indigo-900", to: "to-indigo-700" }, violet: { from: "from-violet-900", to: "to-violet-700" }, purple: { from: "from-purple-900", to: "to-purple-700" }, fuchsia: { from: "from-fuchsia-900", to: "to-fuchsia-700" }, pink: { from: "from-pink-900", to: "to-pink-700" }, rose: { from: "from-rose-900", to: "to-rose-700" }, } as const; export type BookColor = keyof typeof BOOK_COLOR_MAP; export type BookSize = keyof typeof BOOK_SIZE_MAP; export type BookRadius = keyof typeof BOOK_RADIUS_MAP; export type BookShadowSize = keyof typeof BOOK_SHADOW_SIZE_MAP; export { default as Book } from "./Book.vue"; export { default as BookHeader } from "./BookHeader.vue"; export { default as BookTitle } from "./BookTitle.vue"; export { default as BookDescription } from "./BookDescription.vue"; ``` :: ## API ### Components props ::steps{level=4} #### `Book` | Prop 名称 | 类型 | 默认值 | 描述 | | ------------ | ------- | ------ | --------------------------------------------- | | `class` | String | - | Additional classes for styling the component. | | `duration` | Number | 1000 | Animation duration in milliseconds. | | `color` | String | "zinc" | Color theme for the book gradient. | | `isStatic` | Boolean | false | Disables hover animations when true. | | `size` | String | "md" | Size variant of the book. | | `radius` | String | "md" | Border radius variant of the book. | | `shadowSize` | String | "lg" | Shadow size variant of the book. | #### `BookHeader` | Prop 名称 | 类型 | 默认值 | 描述 | | --------- | ------ | ------ | -------------------------------------- | | `class` | String | - | Additional classes for custom styling. | #### `BookTitle` | Prop 名称 | 类型 | 默认值 | 描述 | | --------- | ------ | ------ | -------------------------------------- | | `class` | String | - | Additional classes for custom styling. | #### `BookDescription` | Prop 名称 | 类型 | 默认值 | 描述 | | --------- | ------ | ------ | -------------------------------------- | | `class` | String | - | Additional classes for custom styling. | :: ## 感谢 - Credits to [x/UI](https://ui.3x.gl/docs/book) for inspiring this component. - Credits to [kalix127](https://github.com/kalix127) for porting this component. URL: https://inspira-ui.com/docs/zh-cn/components/miscellaneous/compare --- title: 左右对比 description: Slide to compare any two pieces of content - images, designs, code, or custom elements --- ```vue ``` ## 通过 CLI 安装 ```vue ``` ## 手动安装 在同一个文件中,复制并粘贴以下代码: ::code-group :CodeViewerTab{label="Compare.vue" language="vue" componentName="Compare" type="ui" id="compare"} :CodeViewerTab{label="StarField.vue" language="vue" componentName="StarField" type="ui" id="compare"} :: ## 示例 Drag handle with custom content ```vue ``` AutoPlay ```vue ``` Custom Content with AutoPlay ```vue ``` ## API ### Props | Prop 名称 | 类型 | 默认值 | 描述 | | ------------------------- | ------------------- | ---------------- | ----------------------------------------- | | `firstImage` | `string` | `""` | URL of the first image | | `secondImage` | `string` | `""` | URL of the second image | | `firstImageAlt` | `string` | `"First image"` | Alt text for first image | | `secondImageAlt` | `string` | `"Second image"` | Alt text for second image | | `class` | `string` | `""` | Additional classes for the component | | `firstContentClass` | `string` | `""` | Classes applied to first content wrapper | | `secondContentClass` | `string` | `""` | Classes applied to second content wrapper | | `initialSliderPercentage` | `number` | `50` | Initial position of slider (0-100) | | `slideMode` | `"hover" \| "drag"` | `"hover"` | Interaction mode for the slider | | `showHandlebar` | `boolean` | `true` | Show/hide the handle bar | | `autoplay` | `boolean` | `false` | Enable/disable autoplay | | `autoplayDuration` | `number` | `5000` | Duration of autoplay cycle in ms | ### Events | Event Name | Payload | 描述 | | ------------------- | -------- | -------------------------------------------- | | `update:percentage` | `number` | Emitted when slider position changes (0-100) | | `drag:start` | - | Emitted when dragging starts | | `drag:end` | - | Emitted when dragging ends | | `hover:enter` | - | Emitted when mouse enters component | | `hover:leave` | - | Emitted when mouse leaves component | ### Slots | Slot Name | 默认值 Content | 描述 | | ---------------- | ------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | | `first-content` | `` element if `firstImage` prop is provided | Content shown on the left/first side of the comparison. Has full access to component width/height. | | `second-content` | `` element if `secondImage` prop is provided | Content shown on the right/second side of the comparison. Has full access to component width/height. | | `handle` | 默认值 slider handle with dots icon | Custom handle for the slider. Automatically positioned at the dividing line. Should handle positioning with absolute positioning. | ## 感谢 - Credits to [M Atif](https://github.com/atif0075) for this component. - Inspired from [Aceternity UI's Compare](https://ui.aceternity.com/components/compare). URL: https://inspira-ui.com/docs/zh-cn/components/miscellaneous/container-scroll --- title: Container Scroll description: A container scrolling effect that transforms the content inside based on scroll progress. Features smooth transitions with scaling and rotating effects on scroll. --- ```vue ``` ## 通过 CLI 安装 ```vue ``` ## 手动安装 在同一个文件中,复制并粘贴以下代码: ::code-group :CodeViewerTab{label="ContainerScroll.vue" language="vue" componentName="ContainerScroll" type="ui" id="container-scroll"} :CodeViewerTab{label="ContainerScrollTitle.vue" language="vue" componentName="ContainerScrollTitle" type="ui" id="container-scroll"} :CodeViewerTab{label="ContainerScrollCard.vue" language="vue" componentName="ContainerScrollCard" type="ui" id="container-scroll"} :: ## API ::steps ### `ContainerScroll` The `ContainerScroll` component creates a 3D scroll effect. As the user scrolls, the content inside the container is transformed with scale, rotation, and translation effects. #### Props | Prop 名称 | 类型 | 默认值 | 描述 | | ------------ | ------ | ------ | ----------------------------------------------------------------------------- | | `rotate` | Number | `0` | Controls the rotation of the inner content based on the scroll progress. | | `scale` | Number | `1` | Controls the scaling transformation applied to the content during the scroll. | | `translateY` | Number | `0` | Controls the vertical translation of the title during the scroll. | #### 用例 ```vue [ContainerScroll.vue] ``` ### `ContainerScrollTitle` The `ContainerScrollTitle` component handles the title's transformation as the user scrolls, applying a vertical translation effect. #### Props | Prop 名称 | 类型 | 默认值 | 描述 | | ----------- | ------ | ------ | ----------------------------------------------- | | `translate` | Number | `0` | Controls the vertical translation of the title. | #### 用例 ```vue [ContainerScrollTitle.vue] ``` ### `ContainerScrollCard` The `ContainerScrollCard` component applies scale and rotation effects to the card content as the user scrolls through the page. #### Props | Prop 名称 | 类型 | 默认值 | 描述 | | --------- | ------ | ------ | ------------------------------------------------ | | `rotate` | Number | `0` | Controls the rotation effect of the card. | | `scale` | Number | `1` | Controls the scaling effect applied to the card. | #### 用例 ```vue [ContainerScrollCard.vue] ``` :: ## 功能特性 - **3D Scroll Effects**: The content transforms based on scroll progress, including rotation, scaling, and translation. - **Responsive Design**: Adjusts behavior dynamically for mobile and desktop views. - **Smooth Transitions**: Leverages CSS keyframes and scroll-based transformations for a fluid user experience. ## CSS Variables To customize the scroll animations and responsiveness, you can set the following CSS variables: - **`--scale-start`**: Initial scale value for the card. - **`--scale-end`**: Final scale value for the card as the scroll progresses. - **`--rotate-start`**: Initial rotation value for the card. - **`--rotate-end`**: Final rotation value for the card as the scroll progresses. ## 功能特性 - **Dynamic Transformations**: Based on scroll position, the content scales, rotates, and translates for a 3D effect. - **Flexible Content**: Place any custom content inside the title and card slots. - **Responsive**: Adjusts for mobile and desktop, providing a consistent experience across devices. ## 感谢 - Inspired by [Aceternity UI Container Scroll Animation](https://ui.aceternity.com/components/container-scroll-animation). URL: https://inspira-ui.com/docs/zh-cn/components/miscellaneous/dock --- title: Dock description: A macOS-style dock with magnifying icons as you hover over them. --- ```vue ``` ## 通过 CLI 安装 ```vue ``` ## 手动安装 在同一个文件中,复制并粘贴以下代码: ::code-group :CodeViewerTab{filename="Dock.vue" language="vue" componentName="Dock" type="ui" id="dock"} :CodeViewerTab{filename="DockIcon.vue" language="vue" componentName="DockIcon" type="ui" id="dock"} :CodeViewerTab{filename="DockSeparator.vue" language="vue" componentName="DockSeparator" type="ui" id="dock"} :CodeViewerTab{filename="index.ts" language="ts" componentName="index" extension="ts" type="ui" id="dock"} :CodeViewerTab{filename="types.ts" language="ts" componentName="types" extension="ts" type="ui" id="dock"} :CodeViewerTab{filename="injectionKeys.ts" language="ts" componentName="injectionKeys" extension="ts" type="ui" id="dock"} :: ## API ::steps ### `Dock` | Prop 名称 | 类型 | 描述 | | --------------- | -------- | --------------------------------------------------------------------- | | `class` | `string` | Additional classes to apply to the dock container. | | `magnification` | `number` | Magnification factor for the dock icons on hover (default: 60). | | `distance` | `number` | Distance from the icon center where magnification applies. | | `direction` | `string` | Alignment of icons (`top`, `middle`, `bottom`) (default: middle). | | `orientation` | `string` | Orientation of Dock (`vertical`, `horizontal`) (default: horizontal). | | Slot Name | 描述 | | --------- | ---------------------------------------------------- | | `default` | Dock Dock or other child components to be displayed. | ### `DockIcon` | Slot Name | 描述 | | --------- | ------------------------------------------------------- | | `default` | Component or icon to be displayed inside the dock icon. | :: ## 感谢 - Credits to macOS Dock for the design inspiration and the fantastic hover magnification effect. URL: https://inspira-ui.com/docs/zh-cn/components/miscellaneous/expandable-gallery --- title: Expandable Gallery description: A responsive image gallery with an interactive hover effect that expands images dynamically. --- ```vue ``` ## 通过 CLI 安装 ```vue ``` ## 手动安装 复制并粘贴以下代码: ```vue ``` ## API | Prop 名称 | 类型 | 默认值 | 描述 | | --------- | ---------- | ------ | ---------------------------------------------- | | `images` | `string[]` | `[]` | Array of image URLs to display in the gallery. | ## 功能特性 - **Interactive Hover Effect**: Images expand when hovered over, creating a dynamic and engaging user experience. - **Responsive Design**: The gallery automatically adjusts to the container size, ensuring it looks great on all devices. - **Smooth Transitions**: Includes smooth scaling animations for a polished visual effect. - **Customizable Content**: Easily update the `images` array to change the gallery's content. ## 感谢 - Inspired from [Expandable Gallery Component by David Mráz](https://x.com/davidm_ml/status/1872319793124282653) URL: https://inspira-ui.com/docs/zh-cn/components/miscellaneous/images-slider --- title: Images Slider description: A full page slider with images that can be navigated with the keyboard. --- ```vue ``` ## 通过 CLI 安装 ```vue ``` ## 手动安装 复制并粘贴以下代码: ```vue ``` ## API | Prop 名称 | 类型 | 默认值 | 描述 | | ------------------ | -------------------------- | ------------------------------------------------- | ------------------------------------------------------------------------------ | | `images` | `string[]` | `[]` | An array of image URLs to show in the slider. | | `hideOverlay` | `boolean` | `false` | Don't create an overlay for the image slider. Slot won't be rendered. | | `overlayClass` | `string` | `''` | A class string to be applied to the overlay container. | | `imageClass` | `string` | `'bg-cover bg-center bg-no-repeat'` | Class string to apply to each of the images. | | `enterFromClass` | `string` | `'scale-0 origin-center'` | Class string applied to the 'enter-from-class' prop on the image transition. | | `enterActiveClass` | `string` | `'transition-transform duration-300 ease-in-out'` | Class string applied to the 'enter-active-class' prop on the image transition. | | `leaveActiveClass` | `string` | `'transition-transform duration-300 ease-in-out'` | Class string applied to the 'leave-active-class' prop on the image transition. | | `autoplay` | `boolean\|number` | `false` | Autoplay interval in ms, or `false` to disable. | | `direction` | `'vertical'\|'horizontal'` | `'vertical'` | The axis on which the slider should operate. | | `perspective` | `string` | `'1000px'` | The perspective to apply to the slider container. | | `modelValue` | `number` | `0` | Two-way binding for the current slide image index. | ## 功能特性 - **Horizontal & Vertical Animations**: You can animate the images horizontally (default) or vertically with the `direction` prop. - **Preloaded Images**: Images are preloaded before showing, preventing flickering loading animation. - **Customisable Autoplay**: Automatically transition through your slides, or allow your users to navigate manually. - **Overlay Anything**: The default slot allows you to overlay whatever content you wish overlay slider. ## 感谢 - Component by [Craig Riley](https://github.com/craigrileyuk) for porting this component. - Credits to [Aceternity UI](https://ui.aceternity.com/components/images-slider) for inspiring this component. URL: https://inspira-ui.com/docs/zh-cn/components/miscellaneous/lens --- title: 放大镜 description: A lens component to zoom into images, videos, or practically anything. --- ```vue ``` ## 通过 CLI 安装 ```vue ``` ## 手动安装 在同一个文件中,复制并粘贴以下代码: ::code-group :CodeViewerTab{label="Lens.vue" language="vue" componentName="Lens" type="ui" id="lens"} :CodeViewerTab{label="Rays.vue" language="vue" componentName="Rays" type="examples" id="lens"} :CodeViewerTab{label="Beams.vue" language="vue" componentName="Beams" type="examples" id="lens"} :: ## 示例 Lens are static in center ```vue ``` ## API | Prop 名称 | 类型 | 默认值 | 描述 | | ------------ | -------------------------- | -------------------- | ---------------------------------------------------------------------------- | | `zoomFactor` | `number` | `1.5` | The magnification factor for the lens. | | `lensSize` | `number` | `170` | The diameter of the lens in pixels. | | `position` | `{ x: number, y: number }` | `{ x: 200, y: 150 }` | The static position of the lens (when isStatic is true). | | `isStatic` | `boolean` | `false` | If true, the lens stays in a fixed position; if false, it follows the mouse. | | `hovering` | `boolean` | `"false"` | External control for the hover state. | ## 功能特性 - **Slot Support**: Easily add any content inside the component using the default slot. ## 感谢 - Credits to [Aceternity UI](https://ui.aceternity.com/components/lens). - Credits to [SivaReddy Uppathi](https://github.com/sivareddyuppathi) for porting this component. URL: https://inspira-ui.com/docs/zh-cn/components/miscellaneous/link-preview --- title: 链接预览 description: 鼠标放置到链接上可动态预览该链接。 --- ```vue ``` ::alert{type="info"} **注意:** This component uses `qss` npm package as a dependency. :: ## 通过 CLI 安装 ```vue ``` ## 手动安装 ::steps{level=4} #### Install the dependencies ::code-group ```bash [npm] npm install qss ``` ```bash [pnpm] pnpm install qss ``` ```bash [bun] bun add qss ``` ```bash [yarn] yarn add qss ``` :: 复制并粘贴以下代码: ```vue ``` :: ## API | Prop 名称 | 类型 | 默认值 | 描述 | | ----------- | --------- | ------- | ------------------------------------------------------------------------------------------- | | `class` | `string` | `""` | Custom class applied to the main element. | | `linkClass` | `string` | `""` | Custom class applied to the link element. | | `width` | `number` | `200` | Width of the preview image. | | `height` | `number` | `125` | Height of the preview image. | | `isStatic` | `boolean` | `false` | Determines if the preview image is static or a URL preview (set to `true` for static mode). | | `imageSrc` | `string` | `""` | The source of the image to display (required if `isStatic` is `true`). | | `url` | `string` | `""` | URL for the link and for generating the preview image (required if `isStatic` is `false`). | ## 感谢 - Credits to [M Atif](https://github.com/atif0075) for porting this component. - Ported from [Aceternity UI's Link Preview](https://ui.aceternity.com/components/link-preview). URL: https://inspira-ui.com/docs/zh-cn/components/miscellaneous/marquee --- title: 走马灯 description: A customizable scrolling component that loops its content horizontally or vertically, with configurable direction, hover pause, and repeat options. --- ```vue ``` ## 通过 CLI 安装 ```vue ``` ## 手动安装 在同一个文件中,复制并粘贴以下代码: ::code-group :CodeViewerTab{label="Marquee.vue" language="vue" componentName="Marquee" type="ui" id="marquee"} :CodeViewerTab{label="ReviewCard.vue" language="vue" componentName="ReviewCard" type="examples" id="marquee"} :: ## API | Prop 名称 | 类型 | 默认值 | 描述 | | -------------- | --------- | ------- | ------------------------------------------------------------------------- | | `class` | `string` | `''` | Custom CSS classes to apply to the outermost container of the marquee. | | `reverse` | `boolean` | `false` | Sets the scrolling direction to reverse (right to left or bottom to top). | | `pauseOnHover` | `boolean` | `false` | Pauses the marquee animation when hovered. | | `vertical` | `boolean` | `false` | Sets the scrolling direction to vertical instead of horizontal. | | `repeat` | `number` | `4` | Number of times the content inside the marquee should be repeated. | ## 功能特性 - **Horizontal & Vertical Scrolling**: You can scroll the content horizontally (default) or vertically with the `vertical` prop. - **Reverse Direction**: Enable reverse scrolling for dynamic effects using the `reverse` prop. - **Pause on Hover**: Pauses the scrolling animation when the user hovers over the marquee. - **Content Repetition**: The `repeat` prop controls how many times the content inside the marquee will loop. - **Custom Duration and Gap**: You can control the animation duration and gap between the repeated items using CSS variables `--duration` and `--gap`. ## CSS Variables You can customize the speed and gap between the items by setting the following CSS variables: - **`--duration`**: Controls the speed of the marquee animation. - **`--gap`**: Sets the space between repeated items in the marquee. ## 功能特性 - **Fully Customizable**: Easily adjust the duration, gap, direction, and hover behavior to suit your needs. - **Smooth Transitions**: The component uses CSS keyframes to achieve smooth scrolling and transitions. - **Multi-Directional**: Scroll content either horizontally or vertically with a simple prop change. - **Content Flexibility**: Place any Vue components or HTML elements inside the marquee slot for dynamic content scrolling. ## 感谢 - Inspired by [Magic UI](https://magicui.design/docs/components/marquee). URL: https://inspira-ui.com/docs/zh-cn/components/miscellaneous/morphing-tabs --- title: Morphing Tabs description: This is a morphing tabs interaction, recreated by Preet's work and featuring the gooey effect component. --- ```vue ``` ## 通过 CLI 安装 ```vue ``` ## 手动安装 复制并粘贴以下代码: ```vue ``` ## API | Prop 名称 | 类型 | 默认值 | 描述 | | ------------------ | ---------- | ------ | ---------------------------------------------- | | `class` | `string` | `""` | Additional class names to style the component. | | `tabs` | `string[]` | `[]` | Tabs. | | `activeTab` | `string` | `""` | Current active Tab. | | `margin` | `number` | `20` | Active tab margin left and right. | | `blurStdDeviation` | `number` | `6` | Svg blur stdDeviation, tab rounded use it. | ## 感谢 - Credits to [Whbbit1999](https://github.com/Whbbit1999) for this component. - Inspired and ported from [@Preet "Exclusion tabs"](https://x.com/wickedmishra/status/1823026659894940124). URL: https://inspira-ui.com/docs/zh-cn/components/miscellaneous/multi-step-loader --- title: Multi Step Loader description: A step loader for screens that works with async conditions too. --- ```vue ``` ## 通过 CLI 安装 ```vue ``` ## 手动安装 复制并粘贴以下代码: ```vue ``` ## API | Prop 名称 | 类型 | 默认值 | 描述 | | ----------------- | --------- | ------- | ---------------------------------------------------------------------------- | | `loading` | `boolean` | `false` | Controls the visibility of the loader. When `true`, the loader is displayed. | | `steps` | `Step[]` | `[]` | Array of step objects defining the loading sequence. | | `defaultDuration` | `number` | `1500` | The duration of each step in milliseconds. | | `preventClose` | `boolean` | `false` | If `true`, the close button will not be shown. | | Event Name | Payload Type | 描述 | | -------------- | ------------ | -------------------------------------------------------------------- | | `state-change` | `number` | Emitted when the current step changes, providing the new step index. | | `complete` | `void` | Emitted when all steps have been completed. | | `close` | `void` | Emitted when the loader is closed by button. | ## 感谢 - Credits to [M Atif](https://github.com/atif0075) for this component. - Inspired from [Aceternity UI's Multi Step Loader](https://ui.aceternity.com/components/multi-step-loader). URL: https://inspira-ui.com/docs/zh-cn/components/miscellaneous/photo-gallery --- title: 照片墙 description: Showcase your team with pride using our stunning Photo Gallery Component. --- ```vue ``` ## 通过 CLI 安装 ```vue ``` ## 手动安装 复制并粘贴以下代码: ```vue ``` ## API | Prop 名称 | 类型 | 默认值 | 描述 | | ---------------- | ------------------- | ------ | ------------------------------------------------------ | | `items` | `"[{src: string}]"` | `[]` | Pass items / image src to animate | | `containerClass` | `string` | `""` | Additional tailwind CSS classes for container styling. | | `class` | `string` | `""` | Additional tailwind CSS classes for custom styling. | ## 感谢 - All images from [Pexels](https://www.pexels.com/@soldiervip/) - Thanks to [SivaReddy Uppathi](https://github.com/sivareddyuppathi) for providing this component. URL: https://inspira-ui.com/docs/zh-cn/components/miscellaneous/scroll-island --- title: 滚动岛 description: A dynamic and interactive component that displays scroll progress with animated visuals and an expandable area for additional content. --- ```vue ``` ::alert{type="info"} **注意:** This component requires `@number-flow/vue` as a dependency. :: ## 通过 CLI 安装 ```vue ``` ## 手动安装 ::steps{level=4} #### Install the dependencies ::code-group ```bash [npm] npm install @number-flow/vue ``` ```bash [pnpm] pnpm install @number-flow/vue ``` ```bash [bun] bun add @number-flow/vue ``` ```bash [yarn] yarn add @number-flow/vue ``` :: 复制并粘贴以下代码: ```vue ``` :: ## API | Prop 名称 | 类型 | 默认值 | 描述 | | --------- | -------- | ------------ | ----------------------------------------------- | | `class` | `string` | `""` | Additional CSS classes for custom styling. | | `title` | `string` | `"Progress"` | Title displayed in the header of the component. | | `height` | `string` | `44` | Height of the component. | ## 功能特性 - **Scroll Progress Tracking**: Dynamically displays the scroll progress of the page as a percentage. - **Expandable Layout**: Transforms between a circular and a rectangular layout based on user interaction. - **Animated Circular Progress Bar**: Displays a visually appealing progress bar with smooth transitions. - **Dynamic Content Slot**: Supports additional content in the expandable section. - **Dark Mode Support**: Adapts to the dark or light mode of the user's system preferences. ## 感谢 - Inspired by the work of [Ali Samadi](https://x.com/alisamadi__/status/1854312982559502556) & [Nitish Khagwal](https://x.com/nitishkmrk) - [NumberFlow by Maxwell Barvian](https://number-flow.barvian.me/vue) for number formatting and animations. URL: https://inspira-ui.com/docs/zh-cn/components/miscellaneous/shader-toy --- title: Shader Toy 预览器 description: 一个强大且灵活的组件,可在浏览器中渲染来自 ShaderToy 的交互式 GLSL 着色器。 --- ```vue ``` ## API | 属性名 | 类型 | 默认值 | 描述 | | ------------ | -------------------- | --------- | --------------------------------------- | | `shaderCode` | `string` | `-` | 来自 ShaderToy 的 GLSL 片段着色器源码。 | | `mouseMode` | `'click' \| 'hover'` | `'click'` | 鼠标跟踪模式:点击触发或持续悬停触发。 | | `hue` | `number` | `0` | 调整着色器输出的色相(Hue)。 | | `saturation` | `number` | `1` | 调整着色器输出的饱和度(Saturation)。 | | `brightness` | `number` | `1` | 调整着色器输出的亮度(Brightness)。 | | `speed` | `number` | `1` | | | `class` | `string` | `-` | 应用于容器的自定义类名。 | ## 安装 请确保在项目中安装并引入 `ogl`(用于渲染)。 ::pm-install{name="ogl"} :: ## 使用 CLI 安装 ```vue ``` ## 手动安装 复制并粘贴以下代码: ::code-group ::CodeViewerTab{filename="ShaderToy.vue" language="vue" componentName="ShaderToy" type="ui" id="shader-toy"} :: ::CodeViewerTab{filename="InspiraShaderToy.ts" language="typescript" icon="vscode-icons:file-type-typescript" componentName="InspiraShaderToy" type="ui" id="shader-toy" extension="ts"} :: :: ## 功能特性 - **兼容 ShaderToy**:支持 ShaderToy 风格的 `mainImage`、`iTime`、`iResolution`、`iMouse` 等变量。 - **GLSL 着色器渲染**:支持完整的 ShaderToy 式片段着色器渲染。 - **iMouse 交互支持**:支持实时鼠标交互(点击或悬停)。 - **HSV 颜色控制**:动态调整着色器的色相、饱和度和亮度。 - **响应式设计**:画布尺寸会随容器大小自动调整。 - **运行时控制**:支持动态播放、暂停和重置着色器。 ## 注意事项 - 将 ShaderToy 风格的着色器封装并转换为适用于 WebGL2 环境。 - 颜色控制(`hue`、`saturation`、`brightness`)通过后处理步骤实现 HSV 调整效果。 ## 致谢 - 基于 [OGL](https://github.com/oframe/ogl) 构建。 - 灵感来源于 [Shadertoy](https://shadertoy.com/),并进行了 Vue 兼容性适配。 URL: https://inspira-ui.com/docs/zh-cn/components/miscellaneous/svg-mask --- title: SVG Mask description: A dynamic SVG mask component that reveals content with hover and mouse movement. --- ```vue ``` ## 通过 CLI 安装 ```vue ``` ## 手动安装 在同一个文件中,复制并粘贴以下代码: ::code-group :CodeViewerTab{label="SVGMask.vue" language="vue" componentName="SVGMask" type="ui" id="svg-mask"} ```html [mask.svg] ``` :: ## API | Prop 名称 | 类型 | 默认值 | 描述 | | ------------ | -------- | ------ | ------------------------------------------ | | `class` | `string` | `""` | Additional CSS classes for custom styling. | | `size` | `number` | `10` | Initial size of the mask in pixels. | | `revealSize` | `number` | `600` | Size of the mask during hover in pixels. | ## 功能特性 - **Hover-Activated Mask**: The SVG mask dynamically enlarges when hovered, revealing the content beneath. - **Mouse Tracking**: The mask follows the cursor, creating an engaging and interactive effect. - **Customizable Mask Size**: Adjust the initial size (`size`) and hover size (`revealSize`) for different effects. - **Slot-Based Content**: Supports named slots for base and reveal content, making it flexible for various use cases. - **Responsive Background**: Includes hover-based background color transitions for added visual appeal. ## 感谢 - Ported from [Aceternity UI's SVG Mask Effect](https://ui.aceternity.com/components/text-generate-effect). URL: https://inspira-ui.com/docs/zh-cn/components/miscellaneous/testimonial-slider --- title: Testimonial Slider description: A lightweight testimonial slider with image rotation, text transitions, and optional auto‑rotation. --- ```vue ``` ## API | Prop 名称 | 类型 | 默认值 | 描述 | | -------------- | ------------------------------------------------------------------- | ------ | ---------------------------------------------------------------------- | | `testimonials` | `Array<{ img: string; quote: string; name: string; role: string }>` | `[]` | Array of testimonial objects displayed by the slider. | | `autoRotate` | `boolean` | `true` | If `true`, the slider advances automatically every `duration` seconds. | | `duration` | `number` | `5` | Interval in seconds between slides when auto‑rotation is enabled. | ## 通过 CLI 安装 ```vue ``` ## 手动安装 You can 复制并粘贴以下代码: to create this component: ::code-group ::CodeViewerTab{label="TestimonialSlider.vue" language="vue" componentName="TestimonialSlider" type="ui" id="testimonial-slider"} :: :: ## 功能特性 - **Avatar & Quote Pairing** — Images animate with a subtle rotation while quotes fade/slide in. - **Auto‑Rotation** — Enable continuous cycling with the `autoRotate` prop. - **Height Fix Utility** — Ensures the container height remains stable during transitions. - **Manual Navigation** — Prev / next arrow buttons for user control. - **CSS‑Driven Animations** — Uses Vue `` and custom CSS for smooth effects, no extra libraries required. - **Fully Responsive** — Adjusts gracefully across screen sizes. URL: https://inspira-ui.com/docs/zh-cn/components/miscellaneous/timeline --- title: Timeline description: A visually appealing and interactive timeline component with smooth animations, sticky labels, and a gradient scrolling effect. --- ```vue ``` ## API | Prop 名称 | 类型 | 默认值 | 描述 | | ---------------- | ---------------------------------- | ------ | -------------------------------------------------- | | `containerClass` | `string` | `""` | Additional CSS classes for the timeline container. | | `class` | `string` | `""` | Additional CSS classes for styling. | | `items` | `{ id: string; label: string; }[]` | `[]` | List of timeline items, each with an ID and label. | | `title` | `string` | `""` | Title of the timeline section. | | `description` | `string` | `""` | Description text displayed below the title. | ## 通过 CLI 安装 ```vue ``` ## 手动安装 You can 复制并粘贴以下代码: to create this component: ::code-group ::CodeViewerTab{label="Timeline.vue" language="vue" componentName="Timeline" type="ui" id="timeline"} :: :: ## 功能特性 - **Animated Scroll Effect**: The timeline bar animates smoothly as the user scrolls. - **Sticky Labels**: Each event label remains visible while scrolling. - **Gradient Progress Bar**: A visually appealing timeline indicator with gradient effects. - **Slot Support**: Custom content can be placed within each timeline item. - **Responsive Design**: Adapts seamlessly to different screen sizes. - **Dark Mode Support**: Automatically adjusts to light or dark themes. ## 感谢 - Inspired and ported from [Aceternity UI's Timeline](https://ui.aceternity.com/components/timeline). URL: https://inspira-ui.com/docs/zh-cn/components/miscellaneous/tracing-beam --- title: Tracing Beam description: A component that renders a tracing beam effect with dynamic scrolling animations and gradient strokes. --- ```vue ``` ## 通过 CLI 安装 ```vue ``` ## 手动安装 复制并粘贴以下代码: ```vue ``` ## API | Prop 名称 | 类型 | 默认值 | 描述 | | --------- | -------- | ------ | ------------------------------------------ | | `class` | `string` | `""` | Additional CSS classes for custom styling. | ## 功能特性 - **Dynamic Tracing Beam**: Renders a gradient tracing beam that follows the scroll position, adding a modern visual effect. - **Scroll-Based Animation**: As the user scrolls, the beam animates along a path with varying gradients, responding to scroll depth. - **Gradient Transition**: Smoothly transitions colors along the beam from cyan to purple with fading edges for a subtle effect. - **Slot-Based Content**: Supports a default slot to add content inside the tracing beam container. ## 感谢 - Ported from [Aceternity UI](https://ui.aceternity.com/components/tracing-beam); URL: https://inspira-ui.com/docs/zh-cn/components/special-effects/animated-beam --- title: Animated Beam description: An SVG beam connecting elements with animation. --- ```vue ``` ::alert{type="warning"} This component uses the `nuxt-only` syntax with the ``. If you are not using Nuxt, you can simply remove it. :: ## 通过 CLI 安装 ```vue ``` ## 手动安装 复制并粘贴以下代码: ```vue ``` ## Example Double-sided beam. ```vue ``` Vertical beam. ```vue ``` ## API | Prop 名称 | 类型 | 默认值 | 描述 | | -------------------- | ------------- | ---------------------- | ---------------------------------------------------------------------------- | | `class` | `string` | `""` | Additional CSS classes to apply to the component for customization. | | `containerRef` | `HTMLElement` | N/A | Reference to the container element where the beam is rendered. | | `fromRef` | `HTMLElement` | N/A | Reference to the starting element from which the beam originates. | | `toRef` | `HTMLElement` | N/A | Reference to the ending element where the beam points to. | | `curvature` | `number` | `0` | Controls the curvature of the beam; higher values create a more curved path. | | `reverse` | `boolean` | `false` | Reverses the animation direction of the beam if set to `true`. | | `pathColor` | `string` | `"gray"` | Color of the beam's path. | | `pathWidth` | `number` | `2` | Stroke width of the beam's path. | | `pathOpacity` | `number` | `0.2` | Opacity of the beam's path. | | `gradientStartColor` | `string` | `"#FFAA40"` | Starting color of the beam's gradient animation. | | `gradientStopColor` | `string` | `"#9C40FF"` | Ending color of the beam's gradient animation. | | `delay` | `number` | `0` | Delay before the beam's animation starts, in seconds. | | `duration` | `number` | `Random between 4–7 s` | Duration of the beam's animation cycle, in seconds. | | `startXOffset` | `number` | `0` | Horizontal offset for the beam's starting point. | | `startYOffset` | `number` | `0` | Vertical offset for the beam's starting point. | | `endXOffset` | `number` | `0` | Horizontal offset for the beam's ending point. | | `endYOffset` | `number` | `0` | Vertical offset for the beam's ending point. | ## 功能特性 - **Dynamic Beam Drawing**: Automatically renders a beam between two specified elements on the page. - **Smooth Animation**: Features a gradient animation that flows along the beam's path for a visually engaging effect. - **Customizable Appearance**: Easily adjust color, width, opacity, and curvature to match your design requirements. - **Responsive Updates**: The beam adjusts its position and size in response to window resizing and element repositioning. - **Flexible Animation Control**: Customize the animation's duration, delay, and direction for precise timing. ## 感谢 - Inspired and ported from [Magic UI Animated Beam](https://magicui.design/docs/components/animated-beam). URL: https://inspira-ui.com/docs/zh-cn/components/special-effects/border-beam --- title: 光线边框 description: A stylish animated border beam effect with customizable size, duration, colors, and delay. --- ```vue ``` ::alert{type="warning"} This component uses the `nuxt-only` syntax with the ``. If you are not using Nuxt, you can simply remove it. :: ## 通过 CLI 安装 ```vue ``` ## 手动安装 复制并粘贴以下代码: ```vue ``` ## API | Prop 名称 | 类型 | 默认值 | 描述 | | ------------- | -------- | ----------- | --------------------------------------------------------------------- | | `class` | `string` | `""` | Additional CSS classes for custom styling. | | `size` | `number` | `200` | Size of the animated border beam effect. | | `duration` | `number` | `15` | Duration of the animation in seconds. | | `borderWidth` | `number` | `1.5` | Width of the border around the beam effect. | | `anchor` | `number` | `90` | Anchor point for the beam, determining its position along the border. | | `colorFrom` | `string` | `"#ffaa40"` | Starting color for the gradient of the beam. | | `colorTo` | `string` | `"#9c40ff"` | Ending color for the gradient of the beam. | | `delay` | `number` | `0` | Delay before the animation starts, in seconds. | ## 功能特性 - **Animated Border Beam**: Adds a dynamic border beam effect that animates around the border. - **Customizable Gradient Colors**: Adjust the `colorFrom` and `colorTo` props to create a gradient effect that suits your design. - **Flexible Animation Settings**: Control the size, duration, and delay of the animation to fine-tune the visual experience. - **Anchor Positioning**: Use the `anchor` prop to set the starting position of the beam along the border. ## 感谢 - Ported from [Magic UI](https://magicui.design/docs/components/border-beam). URL: https://inspira-ui.com/docs/zh-cn/components/special-effects/confetti --- title: 五彩纸屑 description: 一个五彩纸屑动画的Vue组件。 --- ```vue ``` ::alert{type="info"} **注意:** This component uses `canvas-confetti` npm package as a dependency. :: ## 通过 CLI 安装 ```vue ``` ## 手动安装 ::steps{level=4} #### Install the dependencies ::code-group ```bash [npm] npm install canvas-confetti npm install -D @types/canvas-confetti ``` ```bash [pnpm] pnpm install canvas-confetti pnpm install -D @types/canvas-confetti ``` ```bash [bun] bun add canvas-confetti bun add -d @types/canvas-confetti ``` ```bash [yarn] yarn add canvas-confetti yarn add --dev @types/canvas-confetti ``` :: 复制并粘贴以下代码: ::code-group :CodeViewerTab{label="Confetti.vue" language="vue" componentName="Confetti" type="ui" id="confetti"} :CodeViewerTab{label="ConfettiButton.vue" language="vue" componentName="ConfettiButton" type="ui" id="confetti"} :: :: ## 示例 ### Basic ```vue ``` ### Random Direction ```vue ``` ### Fireworks ```vue ``` ### Side Cannons ```vue ``` ## API ### Components props ::steps{level=4} #### `Confetti` | Prop 名称 | 类型 | 默认值 | 描述 | | --------------- | ----------------------- | ------- | ----------------------------------------------------------------- | | `options` | `ConfettiOptions` | `{}` | Options for individual confetti bursts. | | `globalOptions` | `ConfettiGlobalOptions` | `{}` | Global options for the confetti instance (e.g., resize behavior). | | `manualstart` | `boolean` | `false` | If `true`, confetti won't start automatically on mount. | #### `ConfettiOptions` | Property | 类型 | 默认值 | 描述 | | ------------------------- | --------------------------- | ------------------------------------------------------------------------------- | ---------------------------------------------------------------------- | | `particleCount` | `number` | `50` | The number of confetti particles to launch. | | `angle` | `number` | `90` | The angle in degrees at which to launch the confetti. | | `spread` | `number` | `45` | The spread in degrees of the confetti. | | `startVelocity` | `number` | `45` | The initial velocity of the confetti particles. | | `decay` | `number` | `0.9` | The rate at which confetti particles slow down. | | `gravity` | `number` | `1` | The gravity applied to confetti particles. | | `drift` | `number` | `0` | The horizontal drift applied to confetti particles. | | `ticks` | `number` | `200` | The number of animation frames the confetti should last. | | `origin` | `{ x: number, y: number }` | `{ x: 0.5, y: 0.5 }` | The origin point (from 0 to 1) of the confetti emission. | | `colors` | `string[]` | `['#26ccff', '#a25afd', '#ff5e7e', '#88ff5a', '#fcff42', '#ffa62d', '#ff36ff']` | Array of color strings in HEX format for the confetti particles. | | `shapes` | `string[]` | `['square', 'circle']` | Array of shapes for the confetti particles. | | `scalar` | `number` | `1` | Scaling factor for confetti particle sizes. | | `zIndex` | `number` | `100` | The z-index value for the confetti canvas element. | | `disableForReducedMotion` | `boolean` | `false` | Disables confetti for users who prefer reduced motion. | | `useWorker` | `boolean` | `true` | Use a Web Worker for better performance. | | `resize` | `boolean` | `true` | Whether to automatically resize the canvas when the window resizes. | | `canvas` | `HTMLCanvasElement \| null` | `null` | Custom canvas element to draw confetti on. | | `gravity` | `number` | `1` | The gravity applied to confetti particles. | | `drift` | `number` | `0` | The horizontal drift applied to particles. | | `flat` | `boolean` | `false` | If `true`, confetti particles will be flat (no rotation or 3D effect). | #### `ConfettiButton` | Prop 名称 | 类型 | 默认值 | 描述 | | --------- | -------------------------------------------------- | ------ | ------------------------------------------------ | | `options` | `ConfettiOptions & { canvas?: HTMLCanvasElement }` | `{}` | Options for confetti when the button is clicked. | :: ## 功能特性 - **Confetti Animation**: Easily add confetti animations to your Vue application. - **Customizable Options**: Configure both global and individual options for confetti behavior. - **Manual Control**: Choose whether to start confetti automatically or manually trigger it. - **Button Integration**: Use the `ConfettiButton` component to trigger confetti on button clicks. ## 感谢 - Built using the [canvas-confetti](https://www.npmjs.com/package/canvas-confetti) library. - Ported from [Magic UI Confetti](https://magicui.design/docs/components/confetti). URL: https://inspira-ui.com/docs/zh-cn/components/special-effects/glow-border --- title: 彩光边框 description: An animated border effect. --- ```vue ``` ::alert{type="warning"} This component uses the `nuxt-only` syntax with the ``. If you are not using Nuxt, you can simply remove it. :: ## Installation ::alert Add following entry to inline theme in your `main.css` file. ```css @theme inline { --animate-glow: glow var(--duration) infinite linear; @keyframes glow { 0% { background-position: 0% 0%; } 50% { background-position: 100% 100%; } to { background-position: 0% 0%; } } } ``` :: ## 通过 CLI 安装 ```vue ``` ## 手动安装 复制并粘贴以下代码: ```vue ``` ## API | Prop 名称 | 类型 | 默认值 | 描述 | | -------------- | -------------------- | ------ | ---------------------------------------------------------- | | `duration` | `number` | `10` | Duration of the glowing border animation. | | `color` | `string \| string[]` | `#FFF` | Color or array of colors to applied on the glowing border. | | `borderRadius` | `number` | `10` | Radius of the border. | | `borderWidth` | `number` | `2` | Width of the border. | ## 感谢 - Credits to [Magic UI](https://magicui.design/docs/components/shine-border) for this fantastic component. URL: https://inspira-ui.com/docs/zh-cn/components/special-effects/glowing-effect --- title: 光效 description: A dynamic proximity-based glow effect that reacts to mouse movements and scroll events, perfect for highlighting interactive elements. --- ```vue ``` ## API | Prop 名称 | 类型 | 默认值 | 描述 | | ------------------ | ---------------------- | ----------- | ----------------------------------------------------------------------------------------------------- | | `blur` | `number` | `0` | The blur radius applied to the glow layer. | | `inactiveZone` | `number` | `0.7` | Defines the inner radius (as a fraction of the smallest dimension) within which the glow is inactive. | | `proximity` | `number` | `0` | Additional proximity distance (in pixels) to trigger the glow when the cursor is near the element. | | `spread` | `number` | `20` | Size of the spread of the glow effect around the element. | | `variant` | `"default" \| "white"` | `"default"` | Variant of the glow style (e.g., a white-themed version). | | `glow` | `boolean` | `false` | Controls the visibility of the static glow border. | | `class` | `string` | `""` | Additional CSS classes for custom styling. | | `disabled` | `boolean` | `true` | Disables the proximity detection and glow animations when `true`. | | `movementDuration` | `number` | `2` | Duration (in seconds) of the smooth rotation animation. | | `borderWidth` | `number` | `1` | Width (in pixels) of the border applied to the glow effect. | ## 通过 CLI 安装 ```vue ``` ## 手动安装 You can 复制并粘贴以下代码: to create this component: ::code-group ::CodeViewerTab{label="GlowingEffect.vue" language="vue" componentName="GlowingEffect" type="ui" id="glowing-effect"} :: :: ## 功能特性 - **Proximity-Based Activation**: The glow effect is only active when the cursor is within a certain distance of the element. - **Smooth Angle Animation**: Gradually animates rotation based on pointer movement for an appealing dynamic glow. - **Configurable Glow Properties**: Fine-tune blur, spread, and proximity to achieve various visual effects. - **Variant Support**: Choose between default or white glow styling. - **Performance Optimizations**: Event listeners and animation frames are managed efficiently. ## 感谢 - Ported from (Aceternity UI Glowing Effect)[https://ui.aceternity.com/components/glowing-effect] URL: https://inspira-ui.com/docs/zh-cn/components/special-effects/meteors --- title: 流星 description: A component that displays a meteor shower animation with customizable meteor count and styling. --- ```vue ``` ::alert{type="warning"} This component uses the `nuxt-only` syntax with the ``. If you are not using Nuxt, you can simply remove it. :: ## API | Prop 名称 | 类型 | 默认值 | 描述 | | --------- | -------- | ------ | ----------------------------------------------------------------- | | `count` | `number` | `20` | The number of meteors to display in the animation. | | `class` | `string` | `""` | Additional CSS classes to apply to the meteors for customization. | ## Installation ::alert Add following entry to inline theme in your `main.css` file. ```css @theme inline { --animate-meteor-effect: meteor 5s linear infinite; @keyframes meteor { 0% { transform: rotate(215deg) translateX(0); opacity: 1; } 70% { opacity: 1; } 100% { transform: rotate(215deg) translateX(-500px); opacity: 0; } } } ``` :: ## 通过 CLI 安装 ```vue ``` ## 手动安装 复制并粘贴以下代码: ```vue ``` ## 功能特性 - **Meteor Shower Animation**: The component renders an animated meteor shower effect, adding a dynamic visual element to your application. - **Customizable Meteor Count**: Adjust the number of meteors by setting the `count` prop to control the density of the meteor shower. - **Randomized Animations**: Each meteor has randomized position, delay, and duration, creating a natural and varied animation. - **Styling Flexibility**: Pass additional CSS classes through the `class` prop to customize the appearance of the meteors. - **Responsive Design**: The component adapts to different screen sizes and uses Vue’s reactivity for smooth animations. ## 感谢 - Ported from [Aceternity UI's Meteor Effect](https://ui.aceternity.com/components/meteors) URL: https://inspira-ui.com/docs/zh-cn/components/special-effects/neon-border --- title: Neon Border description: A visually appealing neon border component with customizable animations and colors. --- ```vue ``` ## API | Prop 名称 | 类型 | 默认值 | 描述 | | --------------- | ---------------------------- | ----------- | ----------------------------------------------- | | `color1` | `string` | `"#0496ff"` | Primary color of the neon border. | | `color2` | `string` | `"#ff0a54"` | Secondary color of the neon border. | | `animationType` | `"none" \| "half" \| "full"` | `"half"` | 类型 of animation effect applied to the border. | | `duration` | `number` | `6` | Duration of the animation effect in seconds. | | `class` | `string` | `""` | Additional CSS classes for styling. | ## Installation ::alert Add following entry to inline theme in your `main.css` file. ```css @theme inline { --animate-neon-border: neon-border var(--neon-border-duration) linear infinite; @keyframes neon-border { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } } ``` :: ## 通过 CLI 安装 ```vue ``` ## 手动安装 在同一个文件中,复制并粘贴以下代码: ::code-group ::CodeViewerTab{label="NeonBorder.vue" language="vue" componentName="NeonBorder" type="ui" id="neon-border"} :: :: ## 功能特性 - **Customizable Colors**: Allows setting primary and secondary neon colors. - **Three Animation Modes**: Supports `none`, `half`, and `full` animation effects. - **Adjustable Animation Duration**: Duration can be fine-tuned for different effects. - **Reactive Design**: Uses Vue’s reactivity system for dynamic updates. - **Scoped Styles**: Ensures styles do not interfere with other components. ## 感谢 - Inspired by modern neon border effects. URL: https://inspira-ui.com/docs/zh-cn/components/special-effects/particle-image --- title: Particle Image description: Visually appealing particle animation applied to images as seen on NuxtLabs.com --- ```vue ``` ## 通过 CLI 安装 ```vue ``` ## 手动安装 在同一个文件中,复制并粘贴以下代码: ::code-group :CodeViewerTab{label="ParticleImage.vue" language="vue" componentName="ParticleImage" type="ui" id="particle-image"} :CodeViewerTab{label="inspiraImageParticles.js" icon="vscode-icons:file-type-js" componentName="inspiraImageParticles" type="ui" id="particle-image" extension="js"} :CodeViewerTab{label="inspiraImageParticles.d.ts" icon="vscode-icons:file-type-typescriptdef" componentName="inspiraImageParticles" type="ui" id="particle-image" extension="d.ts"} :: ## API | Prop 名称 | 类型 | 默认值 | 描述 | | ----------------- | ----------------------------------------------------------------------------- | -------- | ------------------------------------------------------------------------------- | | `imageSrc` | `string` | `null` | Source URL for the image to which the particle effect is applied. | | `class` | `string` | `null` | Additional CSS classes to apply to the image element. | | `canvasWidth` | `string` | `null` | Width of the particle effect canvas. | | `canvasHeight` | `string` | `null` | Height of the particle effect canvas. | | `gravity` | `string` | `null` | Gravity force affecting the particle movement. | | `particleSize` | `string` | `null` | Size of the particles. | | `particleGap` | `string` | `null` | Gap between particles. | | `mouseForce` | `string` | `null` | Force applied to particles based on mouse movement. | | `renderer` | `"default" \| "webgl"` | `null` | The renderer to use for particle generation, either default or WebGL. | | `color` | `string` | `#FFF` | Hexadecimal color code used for particles. Supports 3 or 6 character hex codes. | | `colorArr` | `number[]` | `null` | Array of numbers to define multiple particle colors. | | `initPosition` | `"random" \| "top" \| "left" \| "bottom" \| "right" \| "misplaced" \| "none"` | `random` | Initial position of the particles when the animation starts. | | `initDirection` | `"random" \| "top" \| "left" \| "bottom" \| "right" \| "none"` | `random` | Initial direction of the particles when the animation starts. | | `fadePosition` | `"explode" \| "top" \| "left" \| "bottom" \| "right" \| "random" \| "none"` | `none` | Position where the particles fade out. | | `fadeDirection` | `"random" \| "top" \| "left" \| "bottom" \| "right" \| "none"` | `none` | Direction in which the particles fade out. | | `noise` | `number` | `null` | Noise of the particles. | | `responsiveWidth` | `boolean` | `false` | Should the canvas be responsive. | ## 感谢 - Credits to [Nuxt Labs](https://nuxtlabs.com) for this inspiration. - Credits to [NextParticles](https://nextparticle.nextco.de) for the base of the animation library. URL: https://inspira-ui.com/docs/zh-cn/components/special-effects/scratch-to-reveal --- title: Scratch To Reveal description: The ScratchToReveal component creates an interactive scratch-off effect with customizable dimensions and animations, revealing hidden content beneath. --- ```vue ``` ## 通过 CLI 安装 ```vue ``` ## 手动安装 复制并粘贴以下代码: ```vue ``` ## API | Prop 名称 | 类型 | 默认值 | 描述 | | ---------------------- | ------------------------ | ------ | --------------------------------------------------------------------------------------------- | | `class` | `string` | `""` | The class name to apply to the component. | | `width` | `number` | `""` | Width of the scratch container. | | `height` | `number` | `""` | Height of the scratch container. | | `minScratchPercentage` | `number` | `50` | Minimum percentage of scratched area to be considered as completed (Value between 0 and 100). | | `gradientColors` | `[string,string,string]` | `-` | Gradient colors for the scratch effect. | | Event Name | Payload | 描述 | | ---------- | ------- | -------------------------------------------------- | | `complete` | `-` | Callback function called when scratch is completed | | Slot Name | 默认值 Content | 描述 | | --------- | -------------- | -------------------------------------- | | `default` | `-` | The text below the scratch-off ticket. | ## Component Code You can 复制并粘贴以下代码: to create this component: ```vue ``` ## 感谢 - Credits to [Whbbit1999](https://github.com/Whbbit1999) for this component. - Inspired by [MagicUI Scratch To Reveal](https://magicui.design/docs/components/scratch-to-reveal). URL: https://inspira-ui.com/docs/zh-cn/components/special-effects/spring-calendar --- title: Spring Calendar description: An animated calendar widget that expands to reveal events and features smooth, spring‑based Motion‑V transitions. --- ```vue ``` ## API | Prop 名称 | 类型 | 默认值 | 描述 | | -------------- | -------------------------------------------------------------------------------------------------------------- | ------ | --------------------------------------------------------------------- | | `calendarData` | `Array<{ month: string; date: number; day: string; events?: { title: string; day: string; time: string }[] }>` | **—** | Array defining each calendar day and its optional events. _Required_. | | `initialIndex` | `number` | `0` | Day index initially selected. | ### Emits | Event | Payload | 描述 | | -------------------- | -------- | ------------------------------------------------------------------ | | `update:activeIndex` | `number` | Fires when a day button is clicked, emitting the new active index. | ## 通过 CLI 安装 ```vue ``` ## 手动安装 复制并粘贴以下代码: ::code-group ::CodeViewerTab{label="SpringCalendar.vue" language="vue" componentName="SpringCalendar" type="ui" id="spring-calendar"} :: ::CodeViewerTab{label="TextMorph.vue" language="vue" componentName="TextMorph" type="ui" id="spring-calendar"} :: :: ## 功能特性 - **Spring Animations** — Uses `MotionConfig` to apply realistic spring/bounce transitions when height changes. - **Dynamic Height** — The outer card automatically grows to fit event listings. - **TextMorph Integration** — Day labels morph smoothly via the `TextMorph` sub‑component. - **Interactive Day Picker** — Clickable day chips with hover/press scale effects. - **Responsive Layout** — Flexbox layout that wraps chips and events neatly. ## 感谢 - Inspired from the work of [sekachov](https://x.com/sekachov) URL: https://inspira-ui.com/docs/zh-cn/components/text-animations/3d-text --- title: 3D文字 description: A stylish 3D text component with customizable colors, shadows, and animation options. --- ```vue ``` ## 通过 CLI 安装 ```vue ``` ## 手动安装 复制并粘贴以下代码: ```vue ``` ## API | Prop 名称 | 类型 | 默认值 | 描述 | | ------------------- | --------- | ---------- | -------------------------------------------------- | | `textColor` | `string` | `"white"` | Color of the main text. | | `letterSpacing` | `number` | `-0.1` | Adjusts the spacing between letters in `ch` units. | | `strokeColor` | `string` | `"black"` | Color of the text stroke. | | `shadowColor` | `string` | `"yellow"` | Color of the text shadow. | | `strokeSize` | `number` | `20` | Thickness of the text stroke in pixels. | | `shadow1Size` | `number` | `7` | Size of the first shadow layer in pixels. | | `shadow2Size` | `number` | `10` | Size of the second shadow layer in pixels. | | `class` | `string` | `""` | Additional CSS classes for custom styling. | | `animate` | `boolean` | `true` | Enables wiggle animation when set to `true`. | | `animationDuration` | `number` | `1500` | Duration of the wiggle animation in milliseconds. | ## 功能特性 - **3D Text Effect**: Adds a three-dimensional stroke and shadow effect to text for a bold, layered look. - **Customizable Colors & Sizes**: Easily adjust text color, stroke size, shadow colors, and letter spacing. - **Wiggle Animation**: Includes an optional wiggle animation to make the text bounce for added emphasis. - **Flexible Animation Control**: Customize the animation speed with the `animationDuration` prop. URL: https://inspira-ui.com/docs/zh-cn/components/text-animations/blur-reveal --- title: Blur Reveal description: A component to smoothly blur fade in content. --- ```vue ``` ::alert{type="warning"} This component uses the `nuxt-only` syntax with the ``. If you are not using Nuxt, you can simply remove it. :: ## 通过 CLI 安装 ```vue ``` ## 手动安装 复制并粘贴以下代码: ```vue ``` ## API | Prop 名称 | 类型 | 默认值 | 描述 | | ---------- | -------- | ------ | ---------------------------------------------------------------------------- | | `duration` | `number` | `1` | Duration of the blur fade in animation. | | `delay` | `number` | `1` | Delay between child components to reveal | | `blur` | `string` | `10px` | Amount of blur to apply to the child components. | | `yOffset` | `number` | `20` | Specifies the vertical offset distance (yOffset) for the entrance animation. | ## 感谢 - Credits to [Magic UI](https://magicui.design/docs/components/blur-fade) for this fantastic component. URL: https://inspira-ui.com/docs/zh-cn/components/text-animations/box-reveal --- title: Box Reveal description: An animated box reveal effect with customizable colors, duration, and delay. --- ```vue ``` ## 通过 CLI 安装 ```vue ``` ## 手动安装 复制并粘贴以下代码: ```vue ``` ## API | Prop 名称 | 类型 | 默认值 | 描述 | | ---------- | -------- | ----------- | ---------------------------------------------------- | | `color` | `string` | `"#5046e6"` | Background color of the reveal box. | | `duration` | `number` | `0.5` | Duration of the reveal animation in seconds. | | `delay` | `number` | `0.25` | Delay before the reveal animation starts in seconds. | | `class` | `string` | `""` | Additional CSS classes for custom styling. | ## 功能特性 - **Box Reveal Animation**: Creates a sliding box reveal effect with smooth transitions. - **Customizable Animation**: Control the animation timing with the `duration` and `delay` props. - **Slot-Based Content**: Supports default slot content that appears once the reveal animation completes. - **Custom Background Color**: Easily customize the box's background color using the `color` prop. ## 感谢 - Ported from [Magic UI Box Reveal](https://magicui.design/docs/components/box-reveal). URL: https://inspira-ui.com/docs/zh-cn/components/text-animations/colorful-text --- title: Colourful Text description: A text component with various colours, filter and scale effects. --- ```vue ``` ## 通过 CLI 安装 ```vue ``` ## 手动安装 复制并粘贴以下代码: ```vue ``` ## API | Prop 名称 | 类型 | 默认值 | 描述 | | ------------ | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------- | | `text` | `string` | `"black"` | The text string to be rendered with colorful animated characters. Each character will be individually animated with color transitions and motion effects. | | `colors` | `string[]` | `[ "rgb(131, 179, 32)", "rgb(47, 195, 106)", "rgb(42, 169, 210)", "rgb(4, 112, 202)", "rgb(107, 10, 255)", "rgb(183, 0, 218)", "rgb(218, 0, 171)", "rgb(230, 64, 92)", "rgb(232, 98, 63)", "rgb(249, 129, 47)", ]` | The text use colors. | | `startColor` | `string` | `"rgb(255,255,255)"` | The char start color. | | `duration` | `number` | `5` | The animation duration time in seconds. | ## 感谢 - Credits to [Whbbit1999](https://github.com/Whbbit1999) for this component. - Ported from [Aceternity UI Colourful Text](https://ui.aceternity.com/components/colourful-text) URL: https://inspira-ui.com/docs/zh-cn/components/text-animations/container-text-flip --- title: Container Text Flip description: A container that flips through words, animating the width. --- ```vue ``` ## 通过 CLI 安装 ```vue ``` ## 手动安装 复制并粘贴以下代码: ```vue ``` ## Example Standard ```vue ``` Hero section with animation ```vue ``` ## API | Prop 名称 | 类型 | 默认值 | 描述 | | ------------------- | ---------- | ---------------------------------------------- | ---------------------------------------------------- | | `words` | `string[]` | `["better", "modern", "beautiful", "awesome"]` | Array of words to cycle through in the animation | | `interval` | `number` | `3000` | Time in milliseconds between word transitions | | `animationDuration` | `number` | `700` | Duration of the transition animation in milliseconds | | `class` | `string` | `` | Additional CSS classes to apply to the container | | `textClass` | `string` | `` | Additional CSS classes to apply to the text | ## 感谢 - Credits to [Whbbit1999](https://github.com/Whbbit1999) for this component. - Ported from [Aceternity UI Container Text Flip](https://ui.aceternity.com/components/container-text-flip). URL: https://inspira-ui.com/docs/zh-cn/components/text-animations/flip-words --- title: Flip Words description: A component that flips through a list of words. --- ```vue ``` ## 通过 CLI 安装 ```vue ``` ## 手动安装 复制并粘贴以下代码: ```vue ``` ## API | Prop 名称 | 类型 | 描述 | | ---------- | -------- | ------------------------------------------------------------------------------------------ | | `words` | `Array` | An array of words to be displayed and animated. | | `duration` | `number` | Duration (in milliseconds) for each word to be displayed before flipping to the next word. | | `class` | `string` | Additional CSS classes to apply to the component. | ## 感谢 - Credits to [M Atif](https://github.com/atif0075) for porting this component. - Ported from [Aceternity UI's Flip Words](https://ui.aceternity.com/components/flip-words) URL: https://inspira-ui.com/docs/zh-cn/components/text-animations/focus --- title: Focus description: Highlight words in a sentence with a dynamic blurred effect and animated focus frame. Supports auto-cycling or manual hover focus mode. --- ```vue ``` ## API | Prop Name | Type | Default | Description | | ------------------------ | --------- | ----------------- | -------------------------------------------------------------- | | `sentence` | `string` | `"Inspira Focus"` | Text sentence to display and animate word-by-word. | | `manualMode` | `boolean` | `false` | If true, focus highlights on hover; otherwise auto-cycles. | | `blurAmount` | `number` | `5` | Blur radius in pixels for inactive words. | | `borderColor` | `string` | `"green"` | Color of the animated focus frame border. | | `animationDuration` | `number` | `0.5` | Duration in seconds for the focus frame animation transitions. | | `pauseBetweenAnimations` | `number` | `1` | Pause duration in seconds between auto-focus transitions. | ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code: ```vue ``` ## Features - **Word-by-word focus**: Highlights individual words in a sentence with blur on inactive words. - **Auto or manual mode**: Cycle focus automatically or control it with mouse hover. - **Animated focus frame**: Smoothly animates a border frame around the focused word. - **Customizable styling**: Configure blur amount, border color, and animation timing. - **Responsive layout**: Supports flexible wrapping and alignment of words. ## Credits - Inspired from [Focus Text Hover Effect on CodePen](https://codepen.io/CameronFitzwilliam/pen/JJRjMa). URL: https://inspira-ui.com/docs/zh-cn/components/text-animations/hyper-text --- title: Hyper Text description: A hyper changing text animation as you hover.. --- ```vue ``` ## 通过 CLI 安装 ```vue ``` ## 手动安装 复制并粘贴以下代码: ```vue ``` ## API | Prop 名称 | 类型 | 默认值 | 描述 | | --------------- | --------- | -------- | --------------------------------------------------------- | | `class` | `string` | `""` | Additional CSS classes to apply to the component. | | `text` | `string` | Required | Text to animate | | `duration` | `number` | `0.8` | The total duration (in seconds) for the entire animation. | | `animateOnLoad` | `boolean` | `true` | Play animation on load | ## 感谢 - Inspired by [Magic UI's Hyper Text](https://magicui.design/docs/components/hyper-text) component. - Credits to [Prem](https://github.com/premdasvm) for porting this component. URL: https://inspira-ui.com/docs/zh-cn/components/text-animations/letter-pullup --- title: 文字上弹 description: 文字依序向上弹出。 --- ```vue ``` ## 通过 CLI 安装 ```vue ``` ## 手动安装 复制并粘贴以下代码: ```vue ``` ## API | Prop 名称 | 类型 | 默认值 | 描述 | | --------- | -------- | -------------------------- | -------------------------------------------------- | | `class` | `string` | `-` | The class to be applied to the component. | | `words` | `string` | `Staggered Letter Pull Up` | Text to animate. | | `delay` | `number` | `0.05` | Delay each letter's animation by this many seconds | ## 感谢 - Credits to [SivaReddy Uppathi](https://github.com/sivareddyuppathi) for this component. - Inspired from [Magic UI](https://magicui.design/docs/components/letter-pullup). URL: https://inspira-ui.com/docs/zh-cn/components/text-animations/line-shadow-text --- title: Line Shadow Text description: A line shadow text component for Magic UI that adds a shadow effect to the text, making it visually appealing and engaging. --- ```vue ``` ## 通过 CLI 安装 ```vue ``` ## 手动安装 复制并粘贴以下代码: ```vue ``` ## API | Prop 名称 | 类型 | 默认值 | 描述 | | ------------- | -------- | --------- | ------------------------------------------ | | `shadowColor` | `string` | `"black"` | The color of the shadow effect | | `class` | `string` | `""` | Additional CSS classes for custom styling. | | `as` | `string` | `"span"` | The HTML element to render the text as. | ## 功能特性 - **Slot-Based Content**: Supports default slots for dynamic content, making it flexible for various use cases. ## 感谢 - Credits to [SivaReddy Uppathi](https://github.com/sivareddyuppathi) for this component. - Ported from [Magic UI's Line Shadow Text](https://magicui.design/docs/components/line-shadow-text) URL: https://inspira-ui.com/docs/zh-cn/components/text-animations/morphing-text --- title: Morphing Text description: This MorphingText component dynamically transitions between an array of text strings, creating a smooth, engaging visual effect. --- ```vue ``` ::alert{type="warning"} This component uses the `nuxt-only` syntax with the ``. If you are not using Nuxt, you can simply remove it. :: ## 通过 CLI 安装 ```vue ``` ## 手动安装 复制并粘贴以下代码: ```vue ``` ## API | Prop 名称 | 类型 | 默认值 | 描述 | | -------------- | ---------- | ------ | ------------------------------------- | | `texts` | `string[]` | `[]` | Array of texts to morph between. | | `class` | `string` | `""` | Additional classes for the container. | | `morphTime` | `number` | `1.5` | Animation execution time. | | `coolDownTime` | `number` | `0.5` | Animation dwell time. | ## 感谢 - Credits to [Whbbit1999](https://github.com/Whbbit1999) for this component. - Inspired and ported from [Magic UI Morphing Text](https://magicui.design/docs/components/morphing-text). URL: https://inspira-ui.com/docs/zh-cn/components/text-animations/number-ticker --- title: 数字增长 description: 向上或向下计数到目标数字的数字动画。 --- ```vue ``` ## 通过 CLI 安装 ```vue ``` ## 手动安装 复制并粘贴以下代码: ```vue ``` --- ## API | Prop 名称 | 类型 | 默认值 | 描述 | | --------------- | ------------------- | -------------- | ----------------------------------------------------------------- | | `value` | `int` | `0` | Value to count to | | `direction` | `up \| down` | `up` | Direction to count in | | `decimalPlaces` | `number` | `0` | Number of decimal places to show | | `delay` | `number` | `0` | Delay before counting (in milliseconds) | | `duration` | `number` | `1000` | Total duration for the entire animation (in milliseconds). | | `transition` | `TransitionPresets` | `easeOutCubic` | Name of transition preset (https://vueuse.org/core/useTransition) | ## 感谢 - Credits to [Grzegorz Krol](https://github.com/Grzechu335) for porting this component. - Ported from [Magic UI NumberTicker](https://magicui.design/docs/components/number-ticker). URL: https://inspira-ui.com/docs/zh-cn/components/text-animations/radiant-text --- title: Radiant Text description: A glare effect on text. --- ```vue ``` ## 通过 CLI 安装 ```vue ``` ## 手动安装 复制并粘贴以下代码: ```vue ``` ## API | Prop 名称 | 类型 | 默认值 | 描述 | | -------------- | -------- | ------ | ------------------------------------- | | `duration` | `number` | `10` | Duration of the animation in seconds. | | `radiantWidth` | `number` | `100` | Width of the radiant animation. | ## 感谢 - Credits to [Magic UI](https://magicui.design/docs/components/animated-shiny-text) for this fantastic component. URL: https://inspira-ui.com/docs/zh-cn/components/text-animations/sparkles-text --- title: 闪烁字 description: A dynamic text that generates continuous sparkles with smooth transitions, perfect for highlighting text with animated stars. --- ```vue ``` ## 通过 CLI 安装 ```vue ``` ## 手动安装 复制并粘贴以下代码: ```vue ``` ## API | Prop 名称 | 类型 | 默认值 | 描述 | | --------------- | -------- | ---------------------------------------- | --------------------------------------------- | | `class` | `string` | `-` | The class to be applied to the sparkles text. | | `text` | `string` | `` | The text to display. | | `sparklesCount` | `number` | `10` | sparkles count that appears on the text. | | `colors` | `object` | `{first: '#A07CFE'; second: '#FE8FB5';}` | The sparkles colors. | ## 感谢 - Credits to [SivaReddy Uppathi](https://github.com/sivareddyuppathi) for this component. - Inspired from [Magic UI](https://magicui.design/docs/components/sparkles-text). - Credits to [M Atif](https://github.com/atif0075) for updating this component. URL: https://inspira-ui.com/docs/zh-cn/components/text-animations/spinning-text --- title: Spinning Text description: The Spinning Text component animates text in a circular motion with customizable speed, direction, color, and transitions for dynamic and engaging effects. --- ```vue ``` ::alert{type="warning"} This component uses the `nuxt-only` syntax with the ``. If you are not using Nuxt, you can simply remove it. :: ## 示例 reverse ```vue ``` ## API | Prop 名称 | 类型 | 默认值 | 描述 | | ------------ | ------------------------------------------------------- | ------- | ------------------------------------------------------- | | `duration` | `number` | `10` | The duration of the full circular rotation animation. | | `reverse` | `boolean` | `false` | Determines if the animation should rotate in reverse. | | `radius` | `number` | `5` | The radius of the circular path for the text animation. | | `transition` | `motion-v Transition` | `` | Custom transition effects for the animation. | | `variants` | `{container: motion-v Variant, item: motion-v Variant}` | `` | Variants for container and item animations. | | `class` | `string` | `""` | A custom class name for the text container. | ## 通过 CLI 安装 ```vue ``` ## Component Code You can 复制并粘贴以下代码: to create this component: ```vue ``` ## 感谢 - Credits to [Whbbit1999](https://github.com/Whbbit1999) for this component. - Ported from [Magic UI Spinning Text](https://magicui.design/docs/components/spinning-text). URL: https://inspira-ui.com/docs/zh-cn/components/text-animations/text-generate-effect --- title: 文字生成效果 description: 一个酷炫的文本效果,在页面加载时文本一个接一个淡入。 --- ```vue ``` ## 通过 CLI 安装 ```vue ``` ## 手动安装 复制并粘贴以下代码: ```vue ``` ## 示例 Two text with different delay ```vue ``` ::alert{type="warning"} This component uses the `nuxt-only` syntax with the ``. If you are not using Nuxt, you can simply remove it. :: ## API | Prop 名称 | 类型 | 默认值 | 描述 | | ---------- | --------- | -------- | ---------------------------------------------------------------------- | | `words` | `string` | Required | The text to be displayed with the generating effect. | | `duration` | `number` | `0.7` | The duration of the text generation animation in seconds. | | `delay` | `number` | `0` | The delay before the text generation animation starts in milliseconds. | | `filter` | `boolean` | `true` | The blur of the text. | ## 感谢 - Credits to [M Atif](https://github.com/atif0075) for porting this component. - Ported from [Aceternity UI's Text Generate Effect](https://ui.aceternity.com/components/text-generate-effect). URL: https://inspira-ui.com/docs/zh-cn/components/text-animations/text-glitch --- title: Text Glitch description: Creates a vibrant glitch effect on text with customizable speed, shadow colors, and optional hover-triggered animation. --- ```vue ``` ## API | Prop Name | Type | Default | Description | | --------------- | --------- | ----------- | ------------------------------------------------------------- | | `text` | `string` | `""` | The text content to display with the glitch effect. | | `speed` | `number` | `0.5` | Controls the animation speed of the glitch effect in seconds. | | `enableShadows` | `boolean` | `true` | Toggles colored shadows that enhance the glitch look. | | `enableOnHover` | `boolean` | `false` | If true, glitch animation activates only on hover. | | `class` | `string` | `undefined` | Additional CSS classes for the container div. | ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code: ```vue ``` ## Features - **Stylish glitch animation**: Text appears with vibrant RGB channel shifts and clipping. - **Configurable speed**: Easily adjust animation timing via `speed` prop. - **Shadow control**: Enable or disable colored shadows for stronger glitch effect. - **Hover-triggered option**: Activate glitch only on mouse hover to reduce distraction. - **Responsive sizing**: Font size scales smoothly across screen sizes using clamp(). ## Credits - Inspired and developed using resources from following YouTube videos. - https://www.youtube.com/watch?v=7Xyg8Ja7dyY - https://www.youtube.com/watch?v=9CCkp_El1So URL: https://inspira-ui.com/docs/zh-cn/components/text-animations/text-highlight --- title: 文本高亮 description: 填充文本背景以突显文本的效果。 --- ```vue ``` ## 通过 CLI 安装 ```vue ``` ## 手动安装 复制并粘贴以下代码: ```vue ``` ## 示例 With 3s delay ```vue ``` Rounded text background ```vue ``` Color from CSS variables: use the paintbrush icon in the top right corner to change the color. ```vue ``` With text color change. ```vue ``` ## API | Prop 名称 | 类型 | 默认值 | 描述 | | ---------------- | -------- | --------- | -------------------------------------------------------------------------- | | `delay` | `number` | `0` | Delay before the animation starts, in `ms`. | | `duration` | `number` | `2000` | Duration of the animation, in `ms`. | | `text-end-color` | `string` | `inherit` | Color of the text at the end of the animation. Match WCAG recommendations. | ## 感谢 - Inspired by [Aceternity UI](https://ui.aceternity.com/components/hero-highlight) - Credits to [Nathan De Pachtere](https://nathandepachtere.com) for porting this component. URL: https://inspira-ui.com/docs/zh-cn/components/text-animations/text-hover-effect --- title: Text Hover Effect description: A text hover effect that animates and outlines gradient on hover, as seen on x.ai --- ```vue ``` ::alert{type="warning"} This component uses the `nuxt-only` syntax with the ``. If you are not using Nuxt, you can simply remove it. :: ## 通过 CLI 安装 ```vue ``` ## 手动安装 复制并粘贴以下代码: ```vue ``` ## API | Prop 名称 | 类型 | 默认值 | 描述 | | ------------- | -------- | -------- | --------------------------------------------------------- | | `text` | `string` | Required | The text to be displayed with the hover effect. | | `duration` | `number` | `200` | The duration of the mask transition animation in seconds. | | `strokeWidth` | `number` | `0.75` | The width of the text stroke. | | `opacity` | `number` | `null` | The opacity of the text. | URL: https://inspira-ui.com/docs/zh-cn/components/text-animations/text-reveal-card --- title: Text Reveal Card description: Mousemove effect to reveal text content at the bottom of the card. --- ```vue ``` ## 通过 CLI 安装 ```vue ``` ## 手动安装 在同一个文件中,复制并粘贴以下代码: ::code-group :CodeViewerTab{label="TextRevealCard.vue" language="vue" componentName="TextRevealCard" type="ui" id="text-reveal-card"} :CodeViewerTab{filename="TextRevealStars.vue" language="vue" componentName="TextRevealStars" type="ui" id="text-reveal-card"} :: ## API | Prop 名称 | 类型 | 描述 | | ---------- | -------- | ---------------------------------------------------------------- | | class | `String` | Additional classes to be added to the card. | | starsCount | `Number` | Control the number of stars that are generated | | starsClass | `String` | Additional classes to be added to the stars floating on content. | | Slot Name | 描述 | | ---------- | ------------------------------------------------------- | | header | `String` | | text | Display default text when the card is not hovered over. | | revealText | Text to be revealed when hovered over the card. | ## 感谢 - Credits to [M Atif](https://github.com/atif0075) for porting this component. - Ported from [Aceternity UI's Text Reveal Card](https://ui.aceternity.com/components/text-reveal-card). URL: https://inspira-ui.com/docs/zh-cn/components/text-animations/text-reveal --- title: Text Reveal description: Animate text line-by-line using GSAP's SplitText for smooth word or line entrance effects. --- ```vue ``` ## API | Prop Name | Type | Default | Description | | ---------------- | -------- | ------- | ------------------------------------------------ | | `class` | `string` | `-` | Additional classes for the inner text container. | | `containerClass` | `string` | `-` | Additional classes for the outer container. | | `duration` | `number` | `0.6` | Animation duration for line reveal. | | `delay` | `number` | `0.2` | Initial delay before animation starts. | | `stagger` | `number` | `0.1` | Animation delay between each line reveal. | ## Installation This component depends on **GSAP** and **GSAP SplitText**. ::pm-install{name="gsap"} :: ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code: ```vue ``` ## Features - **Line-by-line animation**: Automatically splits and animates lines of text. - **Staggered entry**: Smooth entrance with staggered reveal timing. - **Scoped styling**: Ensures each line is masked for clean transitions. - **Customizable timing**: Control animation duration and delay. ## Credits - Powered by [GSAP](https://gsap.com/) and [GSAP SplitText](https://gsap.com/docs/v3/Plugins/SplitText/). URL: https://inspira-ui.com/docs/zh-cn/components/text-animations/text-scroll-reveal --- title: Text Scroll Reveal description: A component that reveals text word by word as you scroll, with customizable text and styling. --- ```vue ``` ::alert{type="warning"} This component uses the `nuxt-only` syntax with the ``. If you are not using Nuxt, you can simply remove it. :: ## 通过 CLI 安装 ```vue ``` ## 手动安装 在同一个文件中,复制并粘贴以下代码: ::code-group :CodeViewerTab{label="TextScrollReveal.vue" language="vue" componentName="TextScrollReveal" type="ui" id="text-scroll-reveal"} :CodeViewerTab{filename="ScrollWord.vue" language="vue" componentName="ScrollWord" type="ui" id="text-scroll-reveal"} :: ## API | Prop 名称 | 类型 | 默认值 | 描述 | | --------- | -------- | ------ | ------------------------------------------------------------------- | | `text` | `string` | N/A | The text content to display and reveal word by word during scroll. | | `class` | `string` | `""` | Additional CSS classes to apply to the component for customization. | ## 功能特性 - **Scroll-Activated Text Reveal**: The component reveals the provided text word by word as the user scrolls, creating an engaging visual effect. - **Customizable Text Content**: Set the `text` prop to display any text content you wish to reveal during scroll. - **Smooth Animations**: Each word's opacity transitions smoothly based on scroll position, providing a visually appealing experience. - **Styling Flexibility**: Use the `class` prop to pass additional CSS classes for custom styling. - **Reactive Design**: The component uses Vue's reactivity system to update the scroll progress and word visibility in real-time. ## 感谢 - Ported from [Magic UI Text Reveal](https://magicui.design/docs/components/text-reveal). URL: https://inspira-ui.com/docs/zh-cn/components/visualization/bending-gallery --- title: Bending Gallery description: A curved, scrollable 3D gallery with dynamic image cards and animated text rendered using WebGL and OGL. --- ```vue ``` ## API | Prop Name | Type | Default | Description | | -------------- | ----------------------------------- | --------------------- | --------------------------------------------------------------- | | `items` | `{ image: string; text: string }[]` | `[]` | Array of objects containing image URLs and accompanying text. | | `bend` | `number` | `3` | Controls the curvature of the gallery. Higher values bend more. | | `textColor` | `string` | `"#ffffff"` | Color of the text displayed below each image. | | `borderRadius` | `number` | `0.05` | Rounded corners for image cards (in UV space). | | `font` | `string` | `"bold 30px DM Sans"` | Font used for the text below each image. | ## Features - **Curved Layout**: Creates a 3D bending effect across the scrollable gallery. - **Image & Text Support**: Each item includes an image with dynamic text rendered via canvas. - **Customizable Props**: Bend amount, border radius, font, and colors are fully configurable. - **WebGL Rendering**: Utilizes [OGL](https://github.com/oframe/ogl) for GPU-accelerated visuals. - **Smooth Interactions**: Drag or scroll with momentum and responsive snapping. - **Autoloop Gallery**: Seamlessly scroll through items in an infinite loop-like experience. ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code ```vue ``` ## Credits - Inspired by [Infinite Circular Gallery from Codrops](https://tympanus.net/Tutorials/InfiniteCircularGallery/). URL: https://inspira-ui.com/docs/zh-cn/components/visualization/carousal-3d --- title: 3D Carousel description: A dynamic and interactive 3D carousel component using Three.js and Motion-V, allowing smooth infinite rotation and user-controlled interactions. --- ```vue ``` ## API | Prop 名称 | 类型 | 默认值 | 描述 | | ---------------- | ----------- | ------ | ----------------------------------------------------------- | | `items` | `unknown[]` | `[]` | List of images or elements to be displayed in the carousel. | | `class` | `string` | `""` | Additional CSS classes for styling the carousel overlay. | | `containerClass` | `string` | `""` | CSS classes for styling the carousel container. | | `width` | `number` | `450` | Width of individual carousel items. | | `height` | `number` | `600` | Height of individual carousel items. | ## Component Code You can 复制并粘贴以下代码: to create this component: ::code-group ::CodeViewerTab{label="Carousel3D.vue" language="vue" componentName="Carousel3D" type="ui" id="carousel-3d"} :: :: ## 功能特性 - **3D Rotating Carousel**: Displays a rotating 3D carousel using Three.js. - **Smooth Infinite Rotation**: The carousel continuously rotates smoothly. - **User Interaction Support**: Supports mouse and touch interactions to manually rotate the carousel. - **Fully Responsive**: Adapts to different screen sizes dynamically. - **Performance Optimized**: Utilizes Motion-V for smooth animations and easing functions. - **Dynamic Item Rendering**: Accepts an array of items to render in the carousel dynamically. - **Dark Mode Support**: Adaptable to dark and light themes for better UI consistency. ## 感谢 - Built using Three.js for 3D rendering. - Utilizes Motion-V for seamless animations. - Thanks [@safakdinc](https://github.com/safakdinc) for sharing this component. URL: https://inspira-ui.com/docs/zh-cn/components/visualization/file-tree --- title: 文件树 description: 用于显示目录的文件夹和文件结构的组件。 --- ```vue ``` ## 通过 CLI 安装 ```vue ``` ## 手动安装 在同一个文件中,复制并粘贴以下代码: ::code-group :CodeViewerTab{label="Tree.vue" language="vue" componentName="Tree" type="ui" id="file-tree"} :CodeViewerTab{label="Folder.vue" language="vue" componentName="Folder" type="ui" id="file-tree"} :CodeViewerTab{label="File.vue" language="vue" componentName="File" type="ui" id="file-tree"} :CodeViewerTab{label="TreeIndicator.vue" language="vue" componentName="TreeIndicator" type="ui" id="file-tree"} ```ts [index.ts] import type { HTMLAttributes } from "vue"; export interface TreeProps { class?: HTMLAttributes["class"]; initialSelectedId: string; indicator?: boolean; elements: TreeViewElement[]; initialExpandedItems: string[]; openIcon?: string; closeIcon?: string; fileIcon?: string; direction?: "rtl" | "ltr"; } export interface TreeContextProps { selectedId: Ref; expandedItems: Ref; indicator: boolean; openIcon: string; closeIcon: string; fileIcon: string; direction: "rtl" | "ltr"; handleExpand: (id: string) => void; selectItem: (id: string) => void; setExpandedItems: (items: string[] | undefined) => void; } export interface TreeViewElement { id: string; name: string; isSelectable?: boolean; children?: TreeViewElement[]; } export interface BaseItemProps { class?: HTMLAttributes["class"]; id: string; name: string; isSelectable?: boolean; isSelect?: boolean; } export interface FolderProps extends BaseItemProps {} export interface FileProps extends BaseItemProps {} export const TREE_CONTEXT_SYMBOL = Symbol("TREE_CONTEXT_SYMBOL"); export { default as Tree } from "./Tree.vue"; export { default as Folder } from "./Folder.vue"; export { default as File } from "./File.vue"; ``` :: ## API ::steps ### `Tree` The `Tree` component serves as a container for displaying a hierarchical file/folder structure. #### Props | Prop 名称 | 类型 | 默认值 | 描述 | | ---------------------- | ------------------- | ---------------------- | -------------------------------------------------- | | `class` | `string` | - | Additional classes for styling the tree container. | | `initialSelectedId` | `string` | - | ID of the initially selected item. | | `indicator` | `boolean` | `true` | Whether to show the tree indicator line. | | `elements` | `TreeViewElement[]` | - | Array of tree elements to display. | | `initialExpandedItems` | `string[]` | - | Array of IDs of initially expanded folders. | | `openIcon` | `string` | `"lucide:folder-open"` | Icon to show for open folders. | | `closeIcon` | `string` | `"lucide:folder"` | Icon to show for closed folders. | | `fileIcon` | `string` | `"lucide:file"` | Icon to show for files. | | `direction` | `"rtl" \| "ltr"` | `"ltr"` | Text direction of the tree. | #### 用例 ```vue [MyComponent.vue] ``` ### `Folder` and `File` The `Folder` and `File` components represent folders and files in the file tree. Folders can contain other `Folder` and `File` components. #### Props | Prop 名称 | 类型 | 默认值 | 描述 | | -------------- | --------- | ------- | --------------------------------------- | | `class` | `string` | - | Additional classes for custom styling. | | `id` | `string` | - | Unique identifier for the item. | | `name` | `string` | - | Display name of the folder/file. | | `isSelectable` | `boolean` | `true` | Whether the item can be selected. | | `isSelect` | `boolean` | `false` | Whether the item is currently selected. | #### 用例 ```vue [MyComponent.vue] ``` :: ## 感谢 - Inspired by [Magic UI](https://magicui.design/docs/components/file-tree). - Credit to [kalix127](https://github.com/kalix127) for porting this component. URL: https://inspira-ui.com/docs/zh-cn/components/visualization/github-globe --- title: 旋转地球 description: A 3D interactive globe visualization with customizable arcs, points, and animation options inspired from Github. --- ```vue ``` ::alert{type="info"} **注意:** This component uses Three.js & requires `three`, `three-globe` & `postprocessing` npm package as a dependency. :: ::alert{type="warning"} **For Nuxt users**: Use `` tag to wrap this component to avoid `window is not defined` error. :: ## 通过 CLI 安装 ```vue ``` ## 手动安装 ::steps{level=4} #### Install the dependencies ::code-group ```bash [npm] npm install three postprocessing three-globe npm install -D @types/three ``` ```bash [pnpm] pnpm install three postprocessing three-globe pnpm install -D @types/three ``` ```bash [bun] bun add three postprocessing three-globe bun add -d @types/three ``` ```bash [yarn] yarn add three postprocessing three-globe yarn add --dev @types/three ``` :: 复制并粘贴以下代码: ```vue ``` #### Download GeoJSON file Download a GeoJSON file containing the globe's geographical data from [GeoJSON Maps](https://geojson-maps.kyd.au/) by customizing the continents and detail level. Save the downloaded file as `globe.json` in the same folder as your component. :: ## API | Prop 名称 | 类型 | 默认值 | 描述 | | ------------- | ------------ | ------ | --------------------------------------------------------------------------------------------------- | | `globeConfig` | `object` | `{}` | Configuration options for the globe, including colors, atmosphere, rotation speed, and lighting. | | `data` | `Position[]` | `[]` | Array of positions representing arcs and points on the globe, with latitude, longitude, color, etc. | | `class` | `string` | `""` | Additional CSS classes for custom styling. | ### `globeConfig` Properties | Property | 类型 | 默认值 | 描述 | | -------------------- | --------- | ----------------------- | -------------------------------------------------------- | | `pointSize` | `number` | `1` | Size of individual points on the globe. | | `globeColor` | `string` | `"#1d072e"` | Color of the globe surface. | | `showAtmosphere` | `boolean` | `true` | Whether to display atmosphere around the globe. | | `atmosphereColor` | `string` | `"#ffffff"` | Color of the atmosphere around the globe. | | `atmosphereAltitude` | `number` | `0.1` | Altitude of the atmosphere layer. | | `emissive` | `string` | `"#000000"` | Emissive color for the globe material. | | `emissiveIntensity` | `number` | `0.1` | Intensity of the emissive color. | | `shininess` | `number` | `0.9` | Shininess of the globe material. | | `polygonColor` | `string` | `rgba(255,255,255,0.7)` | Color of polygon boundaries on the globe. | | `arcTime` | `number` | `2000` | Duration for arcs animation. | | `arcLength` | `number` | `0.9` | Length of arcs on the globe. | | `rings` | `number` | `1` | Number of rings to display per point. | | `maxRings` | `number` | `3` | Maximum rings around each point. | | `initialPosition` | `object` | `{ lat: 0, lng: 0 }` | Initial latitude and longitude for the globe's position. | | `autoRotate` | `boolean` | `false` | Automatically rotate the globe. | | `autoRotateSpeed` | `number` | `0.8` | Speed of auto-rotation when enabled. | ### `data` Structure (Position) | Field | 类型 | 描述 | | ---------- | -------- | ----------------------------------------------- | | `order` | `number` | Order of the point or arc for sequencing. | | `startLat` | `number` | Starting latitude for an arc. | | `startLng` | `number` | Starting longitude for an arc. | | `endLat` | `number` | Ending latitude for an arc. | | `endLng` | `number` | Ending longitude for an arc. | | `arcAlt` | `number` | Altitude of the arc (determines arc height). | | `color` | `string` | Color of the arc or point in hex or RGB format. | ## 功能特性 - **3D Interactive Globe**: A Three.js-based globe with interactive controls and orbit support. - **Customizable Globe & Atmosphere**: Allows configuration of globe color, atmosphere visibility, and colors. - **Arcs & Points Visualization**: Display arcs and points on the globe, simulating connections and locations. - **Auto-Rotate and Zoom**: Supports auto-rotation, zoom, and customizable controls for a dynamic experience. - **Responsive Design**: Adapts to container size and maintains performance with WebGL rendering. ## 感谢 - Built with Three.js and Three Globe libraries, designed for global data visualizations and dynamic effects. - Ported from [Aceternity UI](https://ui.aceternity.com/components/github-globe). URL: https://inspira-ui.com/docs/zh-cn/components/visualization/globe --- title: 旋转半球 description: An interactive rotating globe component. --- ```vue ``` ::alert{type="info"} **注意:** This component uses `cobe` and `vue-use-spring` as a dependency. :: ## 通过 CLI 安装 ```vue ``` ## 手动安装 ::steps{level=4} #### Install the dependencies ::code-group ```bash [npm] npm install cobe vue-use-spring ``` ```bash [pnpm] pnpm install cobe vue-use-spring ``` ```bash [bun] bun add cobe vue-use-spring ``` ```bash [yarn] yarn add cobe vue-use-spring ``` :: 复制并粘贴以下代码: ```vue ``` :: ## API | Prop 名称 | 类型 | 默认值 | 描述 | | ----------- | ------------- | ------- | ----------------------------------------------------------------------------------------------------------- | | `class` | `string` | `""` | Additional CSS classes for custom styling. | | `config` | `COBEOptions` | N/A | Configuration object for the globe, following **[COBE]**(https://cobe.vercel.app/docs/api) library options. | | `mass` | `number` | `1` | Mass parameter for the spring animation controlling rotation inertia. | | `tension` | `number` | `280` | Tension parameter for the spring animation, affecting responsiveness. | | `friction` | `number` | `100` | Friction parameter for the spring animation, affecting damping. | | `precision` | `number` | `0.001` | Precision parameter for the spring animation calculations. | ## 功能特性 - **Interactive 3D Globe**: Provides an interactive 3D globe visualization that users can rotate with mouse or touch interactions. - **Customizable Markers**: Display markers on the globe at specified locations with customizable sizes. - **Smooth Animations**: Utilizes physics-based spring animations for smooth and responsive globe rotations. - **Configurable Appearance**: Customize the globe's appearance and behavior through the `config` prop using COBE library options. - **Responsive Design**: Automatically adjusts to different screen sizes and resolutions. ## 感谢 - Built using the [cobe](https://github.com/shuding/cobe) library for WebGL globe visualization. - Ported from [Magic UI](https://magicui.design/docs/components/globe). URL: https://inspira-ui.com/docs/zh-cn/components/visualization/icon-cloud --- title: 图标云 description: 一个3D交互式球形环绕组件。 --- ```vue ``` ## 通过 CLI 安装 ```vue ``` ## 手动安装 在同一个文件中,复制并粘贴以下代码: ::code-group :CodeViewerTab{label="IconCloud.vue" language="vue" componentName="IconCloud" type="ui" id="icon-cloud"} :CodeViewerTab{filename="index.ts" language="typescript" componentName="index" type="ui" id="icon-cloud" extension="ts"} :: ## API | Prop 名称 | 类型 | 默认值 | 描述 | | --------- | -------- | ------ | --------------------------------------------- | | `class` | `string` | - | Additional classes for styling the component. | | `images` | `array` | `[]` | Array of image URLs to render in the cloud | ## 感谢 - Inspired by [MagicUI](https://magicui.design/docs/components/icon-cloud). - Credits to [kalix127](https://github.com/kalix127) for porting this component. URL: https://inspira-ui.com/docs/zh-cn/components/visualization/infinite-grid --- title: Infinite Grid description: A high-performance, interactive 3D infinite grid component built with OGL as seen on phantom.land --- ```vue ``` ::alert{type="info"} **Note:** This component uses OGL & requires `ogl` and `gsap` as dependencies. :: ## API | Prop Name | Type | Default | Description | | ---------- | ------------------------------ | ------- | ----------------------------------------------------------------------------- | | `cardData` | `CardData[]` | `[]` | Data for every tile shown in the grid. **Required**. | | `options` | `Partial` | `{}` | Optional overrides for layout, camera, and post-processing (see table below). | ### `InfiniteGridOptions` | Option | Type | Default | Description | | --------------------------------------- | --------- | ------- | --------------------------------------------------- | | `gridCols` | `number` | `4` | Grid Columns . | | `gridRows` | `number` | `4` | Grid Rows . | | `gridGap` | `number` | `0` | Gap between squares. | | `tileSize` | `number` | `2.4` | Tile size (OGL units). | | `baseCameraZ` | `number` | `10` | Starting Z-distance of the camera. | | `enablePostProcessing` | `boolean` | `true` | Toggle the post-processing pipeline. | | `postProcessParams.distortionIntensity` | `number` | `-0.2` | Barrel / pincushion distortion strength (0 = none). | | `postProcessParams.vignetteOffset` | `number` | `0.0` | Vignette offset; higher ⇒ smaller clear area. | | `postProcessParams.vignetteDarkness` | `number` | `0.0` | Vignette darkness; higher ⇒ darker edges. | --- ### `CardData` | Field | Type | Required | Description | | ------------- | ---------- | -------- | --------------------------------------------- | | `title` | `string` | ✓ | Main heading text. | | `badge` | `string` | ✓ | Badge label (render logic can be customised). | | `description` | `string` | – | Longer body text. | | `tags` | `string[]` | ✓ | Tag pills rendered at the bottom. | | `date` | `string` | ✓ | Date string shown bottom-right. | | `image` | `string` | – | URL for the tile's background image. | --- ## Emits | Event Name | Payload | Description | | -------------- | ----------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | | `tileClicked` | `{ card: CardData, index: number }` | Fired whenever a tile is clicked/tapped. The payload contains the clicked `CardData` object and its zero-based `index`. | | `onTileLoaded` | - | Fired when all the images are loaded inside the tile. | ## Install using CLI ```vue ``` ## Install Manually #### Install the dependencies ::code-group ```bash [npm] npm install ogl gsap ``` ```bash [pnpm] pnpm install ogl gsap ``` ```bash [bun] bun add ogl gsap ``` ```bash [yarn] yarn add ogl gsap ``` :: #### Copy and paste the following code in the same folder ::code-group :CodeViewerTab{label="InfiniteGrid.vue" language="vue" componentName="InfiniteGrid" type="ui" id="infinite-grid"} :CodeViewerTab{filename="InfiniteGridClass.ts" language="typescript" componentName="InfiniteGridClass" type="ui" id="infinite-grid" extension="ts"} :CodeViewerTab{filename="DisposalManager.ts" language="typescript" componentName="DisposalManager" type="ui" id="infinite-grid" extension="ts"} :CodeViewerTab{filename="EventHandler.ts" language="typescript" componentName="EventHandler" type="ui" id="infinite-grid" extension="ts"} :CodeViewerTab{filename="GridManager.ts" language="typescript" componentName="GridManager" type="ui" id="infinite-grid" extension="ts"} :CodeViewerTab{filename="PostProcessShader.ts" language="typescript" componentName="PostProcessShader" type="ui" id="infinite-grid" extension="ts"} :CodeViewerTab{filename="createTexture.ts" language="typescript" componentName="createTexture" type="ui" id="infinite-grid" extension="ts"} :CodeViewerTab{filename="shaders.ts" language="typescript" componentName="shaders" type="ui" id="infinite-grid" extension="ts"} :CodeViewerTab{filename="types.ts" language="typescript" componentName="types" type="ui" id="infinite-grid" extension="ts"} :: ## Credits - Inspired from [Phantom Land](https://phantom.land) - Special thanks to [Safak Dinc](https://github.com/safakdinc) for the idea and for granting permission to include it here. You can find the original repository at [infinite-grid](https://github.com/safakdinc/infinite-grid). Your contribution is greatly appreciated! - Credits to [kalix127](https://github.com/kalix127) for porting this component. URL: https://inspira-ui.com/docs/zh-cn/components/visualization/light-speed --- title: Light Speed description: A highly customizable 3D highway speed visual effect built with Three.js, featuring animated road, cars, lights, and distortion effects for immersive motion simulation. --- ```vue ``` ## API | Prop Name | Type | Default | Description | | --------------- | ---------------------------- | -------------------- | ------------------------------------------------------------------------------ | | `effectOptions` | `Partial` | See `defaultOptions` | Configuration object to customize road, lights, distortion, speed, and colors. | ## Preset Descriptions - **Preset One**: Deep red hyperspeed lights — uses `deepDistortion`, aggressive burst effect. - **Preset Two**: Subtle zigzag distortion — `turbulentDistortion` with classic highway streaks. - **Preset Three**: Wider roads with center island — `LongRaceDistortion` for long horizontal waves. - **Preset Four**: Smooth xy wobble effect — good for elegant or luxury brand use. - **Preset Five**: Mountain-like terrain distortion with glowing ambient vibes. - **Preset Six**: Minimal streaks — soft turbulence for background moods. ## Installation Requires `three` and `postprocessing` libraries for advanced rendering effects. ::pm-install{name="three postprocessing"} :: ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code: ::code-group ::CodeViewerTab{filename="LightSpeed.vue" language="vue" componentName="LightSpeed" type="ui" id="light-speed"} :: ::CodeViewerTab{filename="LightSpeedApp.ts" language="typescript" icon="vscode-icons:file-type-typescript" componentName="LightSpeedApp" type="ui" id="light-speed" extension="ts"} :: ::CodeViewerTab{filename="presets.ts" language="typescript" icon="vscode-icons:file-type-typescript" componentName="presets" type="ui" id="light-speed" extension="ts"} :: ::CodeViewerTab{filename="shaders.ts" language="typescript" icon="vscode-icons:file-type-typescript" componentName="shaders" type="ui" id="light-speed" extension="ts"} :: :: ## Features - **Realistic highway simulation**: 3D road with lanes, shoulder, and island rendered with custom shaders. - **Dynamic car lights**: Animated left and right car light strips with fading and color variations. - **Multiple distortion presets**: Various distortion effects to simulate road vibrations and speed sensations. - **Camera FOV and speed control**: Smooth zoom and speed-up interactions on mouse/touch events. - **Postprocessing effects**: Bloom and SMAA anti-aliasing for high-quality visuals. - **Highly customizable**: Configure lanes, road width, colors, speeds, light properties, and more via options. - **Responsive design**: Auto-resizes on window change for consistent rendering quality. ## Tips - Combine with dark background & full viewport for immersive results. - Add a CTA or logo overlay with fixed position elements to center attention. ## Credits - Ported to Vue from [Codrops Article](https://tympanus.net/codrops/2019/11/13/high-speed-light-trails-in-three-js/) URL: https://inspira-ui.com/docs/zh-cn/components/visualization/liquid-glass --- title: Liquid Glass Effect description: A visually striking glassmorphism effect using SVG displacement filters similar to Apple Liquid Glass. --- ```vue ``` ## API | Prop Name | Type | Default | Description | | ---------------- | ------------------- | -------------- | --------------------------------------------------------------------------------------- | | `radius` | `number` | `16` | Border radius for the glass container corners (in pixels). | | `border` | `number` | `0.07` | Relative border thickness affecting displacement filter inner margin. | | `lightness` | `number` | `50` | Lightness (0-100) of the overlay color in HSL scale. | | `blend` | `string` | `"difference"` | CSS blend mode used between red and blue displacement layers for the distortion effect. | | `xChannel` | `"R" \| "G" \| "B"` | `"R"` | Channel from displacement image to use for horizontal displacement. | | `yChannel` | `"R" \| "G" \| "B"` | `"B"` | Channel from displacement image to use for vertical displacement. | | `alpha` | `number` | `0.93` | Alpha transparency of the overlay color (0-1). | | `blur` | `number` | `11` | Gaussian blur radius applied to the overlay. | | `rOffset` | `number` | `0` | Additional scale offset for red displacement map. | | `gOffset` | `number` | `10` | Additional scale offset for green displacement map. | | `bOffset` | `number` | `20` | Additional scale offset for blue displacement map. | | `scale` | `number` | `-180` | Base scale factor for displacement effects, combined with individual channel offsets. | | `frost` | `number` | `0.05` | Opacity factor controlling the frosted glass background overlay strength. | | `class` | `string` | `""` | Additional CSS classes applied to the inner slot container wrapping content. | | `containerClass` | `string` | `""` | Additional CSS classes applied to the outer container div. | ## Installation ::alert{type="warning"} This component uses SVG filters, for backdrop blur. These are not supported in Safari and have very limited support in Firefox. It is recommended to use this component when you are targeting Chromium based browsers, and use a fallback component in case user is on Safari or Firefox. For example, Inspira UI landing page, uses Liquid Glass component on Chromium based browsers but fallback to Frosted Glass effect on Safari and Mozilla. :: ## Install using CLI ```vue ``` ## Install Manually Copy and paste the following code: ::code-group ::CodeViewerTab{filename="LiquidGlass.vue" language="vue" componentName="LiquidGlass" type="ui" id="liquid-glass"} :: :: ## Features - **Customizable glass effect**: Control blur, displacement, color channels, and blend modes for a unique glass morphism style. - **Responsive SVG displacement filter**: Dynamically adjusts to container size changes using ResizeObserver. - **Multi-channel displacement**: Applies independent displacement maps for red, green, and blue channels for rich distortion. - **Backdrop-filter integration**: Uses CSS backdrop-filter for real-time background blurring with filter fallback. - **Scoped styling**: Encapsulated styles prevent bleed and ensure smooth border-radius and shadows. - **Flexible content wrapper**: Slot container for any nested content with custom class support. ## Credits - Inspired by Apple Liquid Glass. URL: https://inspira-ui.com/docs/zh-cn/components/visualization/liquid-logo --- title: Liquid Logo description: An advanced WebGL-based component that applies a dynamic, liquid effect to logos or images using custom shaders. --- ```vue ``` ## API | Prop 名称 | 类型 | 默认值 | 描述 | | -------------- | -------- | ------- | -------------------------------------------- | | `class` | `string` | `""` | Additional CSS classes for custom styling. | | `imageUrl` | `string` | `""` | URL of the image to apply the liquid effect. | | `patternScale` | `number` | `2` | Scale of the distortion pattern. | | `refraction` | `number` | `0.015` | Amount of refraction applied to the image. | | `edge` | `number` | `0.4` | Sharpness of the edge effect. | | `patternBlur` | `number` | `0.005` | Blur effect applied to the pattern. | | `liquid` | `number` | `0.07` | Intensity of the liquid animation. | | `speed` | `number` | `0.3` | Animation speed of the liquid effect. | ## Component Code You can 复制并粘贴以下代码: to create this component: ::code-group ::CodeViewerTab{label="LiquidLogo.vue" language="vue" componentName="LiquidLogo" type="ui" id="liquid-logo"} :: ::CodeViewerTab{label="parseLogoImage.ts" language="typescript" componentName="parseLogoImage" type="ui" id="liquid-logo" extension="ts"} :: ::CodeViewerTab{label="shader.ts" language="typescript" componentName="shader" type="ui" id="liquid-logo" extension="ts"} :: :: ## 功能特性 - **Dynamic Liquid Effect**: Transforms logos or images with a fluid, liquid-like motion. - **Custom Shader Utilization**: Built with WebGL2 and GLSL shaders for real-time rendering. - **Interactive Animations**: Smooth and configurable animation effects. - **Responsive Scaling**: Automatically adjusts to different screen sizes and resolutions. - **Configurable Parameters**: Offers a wide range of props to control effects like refraction, speed, and edge sharpness. ## 感谢 - Inspired by the Apple Fluid Motion design. - Ported and enhaced from [Paper Design Concept](https://github.com/paper-design/liquid-logo). URL: https://inspira-ui.com/docs/zh-cn/components/visualization/logo-cloud --- title: Animated Logo Cloud description: Animated company cloud logs. Usually we can use to show company logos. --- ```vue ``` ## 通过 CLI 安装 ```vue ``` ## 手动安装 在同一个文件中,复制并粘贴以下代码: ::code-group :CodeViewerTab{label="AnimatedLogoCloud.vue" language="vue" componentName="AnimatedLogoCloud" type="ui" id="logo-cloud"} :CodeViewerTab{label="IconLogoCloud.vue" language="vue" componentName="IconLogoCloud" type="ui" id="logo-cloud"} :CodeViewerTab{label="StaticLogoCloud.vue" language="vue" componentName="StaticLogoCloud" type="ui" id="logo-cloud"} :CodeViewerTab{filename="index.ts" language="typescript" componentName="index" type="ui" id="logo-cloud" extension="ts"} :: ## 示例 ### Animated logs Animated company logos. ```vue ``` ### Icon Logo Company logo icons ```vue ``` ## API | Prop 名称 | 类型 | 默认值 | 描述 | | --------- | -------- | --------------------------- | -------------------------------------------------------------- | | `class` | `string` | `-` | The delay in milliseconds before adding each item to the list. | | `title` | `string` | `Trusted by Companies like` | Title of animated logs. | | `logos` | `[]` | `[{name: "", path: ""}]` | Array of items(logos) with name & path fields. | ## 感谢 - Credits to [SivaReddy Uppathi](https://github.com/sivareddyuppathi) for this component. URL: https://inspira-ui.com/docs/zh-cn/components/visualization/logo-origami --- title: Logo Origami description: Animated flipping logo with origami effect. --- ```vue ``` ## 通过 CLI 安装 ```vue ``` ## 手动安装 在同一个文件中,复制并粘贴以下代码: ::code-group :CodeViewerTab{label="LogoOrigami.vue" language="vue" componentName="LogoOrigami" type="ui" id="logo-origami"} :CodeViewerTab{filename="LogoOrigamiItem.vue" language="vue" componentName="LogoOrigamiItem" type="ui" id="logo-origami"} :: ## API | Prop 名称 | 类型 | 默认值 | 描述 | | ---------- | -------- | ------ | ------------------------------------------ | | `class` | `string` | `""` | Additional CSS classes for custom styling. | | `duration` | `number` | `1.5` | Duration of the flip animation in seconds. | | `delay` | `number` | `2.5` | Delay between flip animations in seconds. | ## 功能特性 - **Origami Flip Animation**: Animates flipping between multiple child components with an origami-style effect. - **Customizable Timing**: Adjust the `duration` and `delay` props to control the animation speed and interval. - **Slot-Based Content**: Accepts multiple child components or content via default slots. - **Responsive Design**: Designed to adapt to various screen sizes and devices. - **Easy Integration**: Simple to include in your Vue projects with minimal setup. ## 感谢 - Inspired by origami animations and flip effects at [hover.dev](www.hover.dev/components/other#logo-origami) URL: https://inspira-ui.com/docs/zh-cn/components/visualization/orbit --- title: Orbit description: A component that animates content in a circular orbit, with customizable duration, delay, and radius. It also offers an optional orbit path display. --- ```vue ``` ## 通过 CLI 安装 ```vue ``` ## 手动安装 在同一个文件中,复制并粘贴以下代码: ::code-group :CodeViewerTab{label="Orbit.vue" language="vue" componentName="Orbit" type="ui" id="orbit"} :CodeViewerTab{filename="index.ts" language="typescript" componentName="index" type="ui" id="orbit" extension="ts"} :: ## 示例 Synchronized orbit ```vue ``` ## API | Prop 名称 | 类型 | 默认值 | 描述 | | ----------- | --------------------- | -------- | --------------------------------------------------------------------- | | `direction` | `normal` \| `reverse` | `normal` | The direction of the orbit. You can use the constant ORBIT_DIRECTION. | | `duration` | `?number` | `20` | The duration of the orbit animation in seconds. | | `delay` | `?number` | `10` | Delay in seconds before the animation starts. | | `radius` | `?number` | `50` | Radius of the orbit path in pixels. | | `path` | `?boolean` | `false` | Displays a circle path for the orbit if `true`. | ## 功能特性 - **Circular Orbit Animation**: The component animates its content in a smooth circular orbit around the center point. - **Customizable Animation**: The orbit’s duration, delay, and radius are fully adjustable, providing flexibility in animation behavior. - **Optional Orbit Path**: An optional visual representation of the orbit path can be toggled using the `path` prop. - **Reversibility**: The orbit direction can be `reverse` by setting the `direction` prop. - **Responsive and Efficient**: The component handles different container sizes and uses Vue’s reactivity to ensure efficient animation. ## 感谢 - Inspired by [Magic UI](https://magicui.design/docs/components/orbiting-circles). - Credits to [Nathan De Pachtere](https://nathandepachtere.com/) for updating this component. URL: https://inspira-ui.com/docs/zh-cn/components/visualization/spline --- title: Spline description: A Vue wrapper component for the Spline 3D tool, providing events and auto-resizing. --- ```vue ``` ## API | Prop 名称 | 类型 | 默认值 | 描述 | | ---------------- | ---------- | ----------- | ------------------------------------------------------------- | | `scene` | `string` | — | The URL or path to the Spline scene file. **Required**. | | `onLoad` | `Function` | `undefined` | Callback that fires when the Spline scene loads successfully. | | `renderOnDemand` | `boolean` | `true` | Enables or disables Spline's render-on-demand optimization. | | `style` | `object` | `{}` | Custom CSS style applied to the container of the canvas. | **Emits** | Event Name | Payload | 描述 | | -------------------- | ------- | ------------------------------------------------------------- | | `error` | `Error` | Emits if there's an error while loading the Spline scene. | | `spline-mouse-down` | `any` | Emits when a mouseDown event is detected in the Spline scene. | | `spline-mouse-up` | `any` | Emits when a mouseUp event is detected in the Spline scene. | | `spline-mouse-hover` | `any` | Emits when the mouseHover event is triggered. | | `spline-key-down` | `any` | Emits on keyDown within the Spline scene. | | `spline-key-up` | `any` | Emits on keyUp within the Spline scene. | | `spline-start` | `any` | Emits when the Spline scene starts. | | `spline-look-at` | `any` | Emits when a lookAt event occurs. | | `spline-follow` | `any` | Emits when a follow event occurs. | | `spline-scroll` | `any` | Emits on scroll interactions. | ::alert{type="info"} **注意:** This component uses Spline & requires `@splinetool/runtime` npm package as a dependency. :: ## 通过 CLI 安装 ```vue ``` ## 手动安装 ### Install the dependencies ::code-group ```bash [npm] npm install @splinetool/runtime ``` ```bash [pnpm] pnpm install @splinetool/runtime ``` ```bash [bun] bun add @splinetool/runtime ``` ```bash [yarn] yarn add @splinetool/runtime ``` :: ### Component Code You can 复制并粘贴以下代码: to create this component: ::code-group ::CodeViewerTab{label="Spline.vue" language="vue" componentName="Spline" type="ui" id="spline"} :: ::CodeViewerTab{label="ParentSize.vue" language="vue" componentName="ParentSize" type="ui" id="spline"} :: :: ## 功能特性 - **Responsive Canvas**: Uses a `ParentSize` wrapper to adjust to the parent container size. - **Event Bindings**: Exposes Spline’s mouse, keyboard, and scrolling events via Vue emits. - **Render-On-Demand**: Optionally only re-renders when necessary, optimizing performance. - **Easy Integration**: Load a Spline 3D scene by simply passing the `scene` prop. - **Cleanup & Disposal**: Manages resource disposal on unmount to avoid memory leaks. ## 感谢 - Utilizes Spline’s runtime behind the scenes. - Inspired by various 3D web experiences using Spline. URL: https://inspira-ui.com/docs/zh-cn/components/visualization/world-map --- title: 世界地图 description: 显示可定制的世界地图,具有动画弧线和地理点的脉冲效果。 --- ```vue ``` ## API | Prop 名称 | 类型 | 默认值 | 描述 | | ------------ | -------------------------------------------------------------------------------------------------------------------- | ----------- | --------------------------------------------------------------------------------------- | | `dots` | `Array<{ start: { lat: number; lng: number; label?: string }, end: { lat: number; lng: number; label?: string } }> ` | `[]` | Array of dot objects, each containing a start and end coordinate (latitude, longitude). | | `class` | `string` | `""` | Additional CSS classes for custom styling. | | `lineColor` | `string` | `"#0EA5E9"` | Color of the arcs and dot borders. | | `mapColor` | `string` | — | Main color of the dotted map. (**Required**) | | `mapBgColor` | `string` | — | Background color of the map. (**Required**) | ::alert{type="info"} **注意:** This component uses Spline & requires `dotted-map` npm package as a dependency. :: ## 通过 CLI 安装 ```vue ``` ## 手动安装 ### Install the dependencies ::code-group ```bash [npm] npm install dotted-map ``` ```bash [pnpm] pnpm install dotted-map ``` ```bash [bun] bun add dotted-map ``` ```bash [yarn] yarn add dotted-map ``` :: ## Component Code You can 复制并粘贴以下代码: to create this component: ::code-group ::CodeViewerTab{label="WorldMap.vue" language="vue" componentName="WorldMap" type="ui" id="world-map"} :: :: ## 功能特性 - **Animated Arcs**: Smooth arcs between two geographical points using an SVG `path`. - **Dotted Background**: Renders a dotted map using the DottedMap library. - **Pulsing Markers**: Each point animates with expanding circles to highlight the location. - **Dynamic Projection**: Projects latitude/longitude to an 800x400 coordinate plane. - **Customizable Colors**: Control lineColor, mapColor, and mapBgColor. ## 感谢 - Ported from (World Map by Aceternity UI)[https://ui.aceternity.com/components/world-map]. URL: https://inspira-ui.com/docs/zh-cn/blocks/index --- title: 代码块 description: Inspira UI 提供的所有代码块的列表。 navigation: false --- ## 所有代码块 ::ComponentIndex{path="blocks"} :: URL: https://inspira-ui.com/docs/zh-cn/blocks/miscellaneous/hero --- title: Hero description: Elevate website experience with unique hero blocks. --- ### Hero Section 1 ```vue ``` #### Components used: - [Falling Stars Background](https://inspira-ui.com/components/backgrounds/falling-stars) - [Blur Reveal](https://inspira-ui.com/components/text-animations/blur-reveal) - [Flip Words](https://inspira-ui.com/components/text-animations/flip-words) - [Border Beam](https://inspira-ui.com/components/special-effects/border-beam) ### Hero Section 2 ```vue ``` #### Components used: - [Vortex Background](https://inspira-ui.com/components/backgrounds/vortex) - [Animated Tooltip](https://inspira-ui.com/components/miscellaneous/animated-tooltip) - [Text Highlight](https://inspira-ui.com/components/text-animations/text-highlight) - [3D Card](https://inspira-ui.com/components/cards/3d-card) URL: https://inspira-ui.com/docs/zh-cn/blocks/miscellaneous/testimonials --- title: Testimonials description: Show testimonials in style --- ### With skewed marquee ```vue ``` ### With linear marquee ```vue ``` #### Components used - [Marquee & Review](https://inspira-ui.com/components/miscellaneous/marquee) component.