Getting Started
Fork the Repository
Create a personal fork of the project on GitHub by visiting the Inspira UI repository.
Code of Conduct
By participating in this project, you agree to abide by the Code of Conduct, which aims to foster an open and welcoming environment.How to Contribute
Reporting Bugs
If you find a bug, please open an issue 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 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:
-
Create or Update
index.ts- Each folder undercomponents/content/inspira/ui/<component-folder-name>/should have anindex.tsthat exports all Vue files. -
Registry Dependencies - If your component depends on other Inspira UI components, update the
COMPONENT_DEPENDENCIESmap in~/scripts/crawl-content.ts. -
Nuxt-Only Features - If your component uses Nuxt-only features like
<ClientOnly>, mention this in the documentation. - Avoid External Components - Don’t use external UI components that aren’t part of the core Vue.js ecosystem.
- Explicit Imports - Always include explicit imports in your component code for Vue.js compatibility.
-
Icon Usage - Use the built-in
<Icon>component rather than pasting raw SVGs.
Project Structure
Understanding the project structure is crucial for effective contribution: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
PascalCasefor component names and filenames
Component Format
Your Vue components should adhere to the following structure:Commit Messages
Use the Conventional Commits format:- Begin with a type (
feat,fix,docs, etc.) followed by a short description - Example:
feat: add TextHoverEffect component
Documentation Guidelines
Single-File Components
For components contained within a single.vue file:
Multi-File Components
For components consisting of multiple files:Testing
Unit Tests
Write unit tests for your component if applicable to ensure functionality.
Cross-Environment
Test your component in both Nuxt and Vue environments.
Visual Testing
Check the component visually to ensure it renders correctly.
CLI Installation Testing
After updating the registry withpnpm build:registry, test the component installation:
License
By contributing, you agree that your contributions will be licensed under the MIT License.For more detailed information, check out the full CONTRIBUTING.md file in the repository.