A Vue-based accessible design system with headless web components. This library provides accessible, customizable components that can be imported individually to optimize bundle size.
- 🧩 Web Components: Use anywhere, framework-agnostic
- ♿ Accessible: Built with accessibility in mind
- 🎨 Customizable: Style with CSS variables
- 📦 Tree-shakable: Import only what you need
- 🔧 Headless: Behavior and accessibility without opinionated styling
- 🧰 TypeScript: Full type support
You can install individual components or the entire library:
# Install the entire library
npm install @devbyray/vue-wc-components
# Or install individual components
npm install @devbyray/vue-wc-button
npm install @devbyray/vue-wc-input
npm install @devbyray/vue-wc-icon
The packages are also available on GitHub Packages. To use them:
- Create or modify your
.npmrc
file in your project root:
@devbyray:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=${GITHUB_TOKEN}
- Set your GitHub token as an environment variable:
export GITHUB_TOKEN=your_github_token
You can create a token on your Github Profile settings. You should have
read:packages
scope selected.
- Install the packages:
# Install the entire library
npm install @devbyray/vue-wc-components
# Or install individual components
npm install @devbyray/vue-wc-button
npm install @devbyray/vue-wc-input
npm install @devbyray/vue-wc-icon
You can import each component individually:
// Import specific components
import '@devbyray/vue-wc-button';
import '@devbyray/vue-wc-input';
import '@devbyray/vue-wc-icon';
// Or import everything
import '@devbyray/vue-wc-components';
Once imported, you can use the components as HTML elements:
<!-- Button component -->
<vwc-button size="md" variant="primary">Click me</vwc-button>
<!-- Input component -->
<vwc-input
label="Username"
placeholder="Enter your username"
helper-text="Your username must be at least 4 characters"
></vwc-input>
<!-- Icon component -->
<vwc-icon name="star" size="md" color="#FFD700"></vwc-icon>
All components can be customized using CSS variables:
:root {
/* Button customization */
--vwc-button-primary-bg: #4f46e5;
--vwc-button-primary-text: white;
--vwc-button-radius: 8px;
/* Input customization */
--vwc-input-border: 2px solid #e5e7eb;
--vwc-input-radius: 8px;
--vwc-input-focus-border-color: #4f46e5;
/* Icon customization */
--vwc-icon-md-size: 1.75rem;
--vwc-icon-color: #4f46e5;
}
A customizable button component with various sizes and variants.
<vwc-button size="md" variant="primary">Click me</vwc-button>
<vwc-button size="lg" variant="outline" disabled>Disabled</vwc-button>
<vwc-button variant="ghost">
<vwc-icon name="favorite" slot="before"></vwc-icon>
With Icon
</vwc-button>
An accessible input component with label, helper text, and error handling.
<vwc-input
label="Email"
type="email"
placeholder="Enter your email"
required
></vwc-input>
<vwc-input
label="Password"
type="password"
error="Password must be at least 8 characters"
>
<vwc-icon name="lock" slot="before"></vwc-icon>
</vwc-input>
A component for displaying Google Material Icons.
<vwc-icon name="home" size="md"></vwc-icon>
<vwc-icon name="settings" color="#4f46e5"></vwc-icon>
<vwc-icon name="refresh" spin></vwc-icon>
Contributions are welcome! Please feel free to submit a Pull Request.
This library is published to GitHub Packages using a GitHub Actions workflow. To publish a new version:
- Create a new release on GitHub or
- Manually trigger the "Publish Packages" workflow from the Actions tab, selecting the version increment (patch, minor, major)
The publishing workflow:
- Builds all packages
- Runs tests
- Increments versions (when manually triggered)
- Publishes packages to GitHub Packages
EUPL-1.2