Spexop Design System - VSCode Extension
IntelliSense, snippets, and autocomplete for the Spexop Design System.
Features
Component Snippets
Quickly insert Spexop components with code snippets:
spx-button - Button component
spx-card - Card with Header, Body, Footer
spx-input - TextInput component
spx-grid - Grid layout
spx-stack - Stack layout
spx-icon - Icon component
- And many more...
IntelliSense
Component Props
Get intelligent autocomplete for component props with descriptions:
<Button variant="primary" size="md">
Auto-completes variant and size with descriptions from component types.
Icon Names
Autocomplete for all Spexop icons:
<Icon name="home" />
Shows 30+ commonly used icons with categories.
Theme Tokens
CSS variable autocomplete for theme tokens:
.my-class {
color: var(--theme-primary);
padding: var(--theme-spacing-4);
}
Supports color, spacing, typography, radius, shadow, and border tokens.
Snippets
Components
| Prefix |
Description |
spx-button |
Button component |
spx-button-icon |
Button with icon |
spx-card |
Card with header/body/footer |
spx-icon |
Icon component |
spx-icon-import |
Icon with import statement |
spx-input |
TextInput component |
spx-select |
Select component |
spx-checkbox |
Checkbox component |
spx-alert |
Alert component |
spx-badge |
Badge component |
spx-avatar |
Avatar component |
Layout Primitives
| Prefix |
Description |
spx-grid |
Grid layout with GridItem |
spx-grid-layout |
Multi-column grid layout |
spx-stack |
Stack layout |
spx-container |
Container with max width |
spx-spacer |
Spacer component |
Utility Hooks
| Prefix |
Description |
spx-toast |
useToastUtil hook |
spx-modal |
useModalUtil hook |
spx-theme |
useThemeUtil hook |
spx-form |
useFormUtil hook |
spx-theme-setup |
Theme CSS setup |
Installation
Install from the VSCode Marketplace:
- Open VSCode
- Go to Extensions (Cmd+Shift+X / Ctrl+Shift+X)
- Search for "Spexop Design System"
- Click Install
Usage
Using Snippets
Type a snippet prefix (e.g., spx-button) and press Tab to insert the snippet.
Using IntelliSense
The extension automatically provides IntelliSense for:
- Component props when typing
<ComponentName prop="|"
- Icon names when typing
<Icon name="|"
- CSS variables in CSS files
Examples
import { Button } from '@spexop/react';
<Button variant="primary" size="md">
Click me
</Button>
Card
import { Card, CardHeader, CardBody, CardFooter } from '@spexop/react';
<Card variant="outlined">
<CardHeader title="My Card" />
<CardBody>
Card content here
</CardBody>
<CardFooter>
Footer actions
</CardFooter>
</Card>
Grid Layout
import { Grid, GridItem } from '@spexop/react';
<Grid columns={3} gap={16}>
<GridItem>Column 1</GridItem>
<GridItem>Column 2</GridItem>
<GridItem>Column 3</GridItem>
</Grid>
Toast Notifications
import { useToastUtil } from '@spexop/react';
const { toast, renderToasts } = useToastUtil();
toast.success('Operation completed!');
toast.error('Something went wrong');
return (
<div>
{renderToasts()}
</div>
);
Theme Setup
import { generateCSS, techPreset } from '@spexop/theme';
import { useEffect } from 'react';
import { useThemeUtil } from '@spexop/react';
function App() {
useEffect(() => {
const css = generateCSS(techPreset);
const style = document.createElement('style');
style.textContent = css;
document.head.appendChild(style);
}, []);
const { resolvedMode, setMode } = useThemeUtil({ defaultMode: 'auto' });
return <YourComponents />;
}
Requirements
- VSCode 1.80.0 or higher
- TypeScript or JavaScript React files
Resources
Support
For issues, questions, or contributions, please visit:
License
MIT License
Changelog
See CHANGELOG.md for version history.