// Frontend development with React, Vue, Angular, modern web technologies. Use for frontend, ui, react, vue, angular, web, component tags. Provides validation commands, component patterns, accessibility guidance.
| name | Frontend Implementation |
| description | Frontend development with React, Vue, Angular, modern web technologies. Use for frontend, ui, react, vue, angular, web, component tags. Provides validation commands, component patterns, accessibility guidance. |
| allowed-tools | Read, Write, Edit, Bash, Grep, Glob |
Domain-specific guidance for frontend UI development, component implementation, and user interactions.
Load this Skill when task has tags:
frontend, ui, react, vue, angular, webcomponent, jsx, tsx, styling, responsive# Full test suite
npm test
# With coverage
npm test -- --coverage
# Watch mode
npm test -- --watch
# Specific test file
npm test -- UserProfile.test.tsx
# Specific test pattern
npm test -- -t "should render profile"
# Production build
npm run build
# Development build
npm run build:dev
# Type checking (TypeScript)
npm run type-check
# Linting
npm run lint
# Development server
npm start
# With specific port
PORT=3001 npm start
✅ ALL tests MUST pass (0 failures) ✅ Build MUST succeed without errors ✅ No TypeScript/linting errors ✅ Component renders without errors ✅ Responsive design works (mobile, tablet, desktop) ✅ Accessibility standards met (ARIA labels, keyboard navigation)
✅ Test user interactions:
test('submits form with valid data', () => {
render(<LoginForm onSubmit={mockSubmit} />)
fireEvent.change(screen.getByLabelText('Email'), {
target: { value: 'user@example.com' }
})
fireEvent.change(screen.getByLabelText('Password'), {
target: { value: 'password123' }
})
fireEvent.click(screen.getByText('Login'))
expect(mockSubmit).toHaveBeenCalledWith({
email: 'user@example.com',
password: 'password123'
})
})
✅ DO test:
❌ DON'T test:
// ✅ GOOD - Tests what user sees
expect(screen.getByText('Welcome, John')).toBeInTheDocument()
expect(screen.getByRole('button', { name: 'Submit' })).toBeEnabled()
// ❌ BAD - Tests implementation details
expect(component.state.username).toBe('John')
expect(mockFunction).toHaveBeenCalledTimes(1)
Issue: Frontend needs API endpoint that doesn't exist yet
What to try:
If blocked: Report to orchestrator - backend task may be incomplete
Issue: Need icons, images, colors not provided
What to try:
If blocked: Report to orchestrator - need design assets or specifications
Issue: Complex types from API don't match frontend expectations
What to try:
unknown type and validate at runtimeCommon causes:
?Issue: Tests fail in CI but pass locally
What to try:
Issue: Component works on desktop but breaks on mobile
What to try:
⚠️ BLOCKED - Requires Senior Engineer
Issue: [Specific problem - API endpoint 404, missing design specs, etc.]
Attempted Fixes:
- [What you tried #1]
- [What you tried #2]
- [Why attempts didn't work]
Root Cause (if known): [Your analysis]
Partial Progress: [What work you DID complete]
Context for Senior Engineer:
- Error output: [Console errors, network errors]
- Screenshots: [If visual issue]
- Related files: [Files involved]
Requires: [What needs to happen]
import React, { useState, useEffect } from 'react';
interface UserProfileProps {
userId: string;
onUpdate?: (user: User) => void;
}
export const UserProfile: React.FC<UserProfileProps> = ({ userId, onUpdate }) => {
const [user, setUser] = useState<User | null>(null);
const [loading, setLoading] = useState(true);
const [error, setError] = useState<string | null>(null);
useEffect(() => {
fetch(`/api/users/${userId}`)
.then(res => res.json())
.then(data => {
setUser(data);
setLoading(false);
})
.catch(err => {
setError(err.message);
setLoading(false);
});
}, [userId]);
if (loading) return <div>Loading...</div>;
if (error) return <div>Error: {error}</div>;
if (!user) return <div>User not found</div>;
return (
<div className="user-profile">
<h2>{user.name}</h2>
<p>{user.email}</p>
</div>
);
};
import { useState } from 'react';
export const LoginForm = ({ onSubmit }) => {
const [email, setEmail] = useState('');
const [password, setPassword] = useState('');
const [errors, setErrors] = useState({});
const validate = () => {
const newErrors = {};
if (!email) newErrors.email = 'Email required';
if (!email.includes('@')) newErrors.email = 'Invalid email';
if (!password) newErrors.password = 'Password required';
if (password.length < 8) newErrors.password = 'Min 8 characters';
return newErrors;
};
const handleSubmit = (e) => {
e.preventDefault();
const newErrors = validate();
if (Object.keys(newErrors).length > 0) {
setErrors(newErrors);
return;
}
onSubmit({ email, password });
};
return (
<form onSubmit={handleSubmit}>
<div>
<label htmlFor="email">Email</label>
<input
id="email"
type="email"
value={email}
onChange={(e) => setEmail(e.target.value)}
aria-invalid={!!errors.email}
aria-describedby={errors.email ? "email-error" : undefined}
/>
{errors.email && <span id="email-error" role="alert">{errors.email}</span>}
</div>
<div>
<label htmlFor="password">Password</label>
<input
id="password"
type="password"
value={password}
onChange={(e) => setPassword(e.target.value)}
aria-invalid={!!errors.password}
/>
{errors.password && <span role="alert">{errors.password}</span>}
</div>
<button type="submit">Login</button>
</form>
);
};
✅ ARIA labels for all interactive elements ✅ Keyboard navigation works (Tab, Enter, Escape) ✅ Focus indicators visible ✅ Color contrast meets WCAG AA standards ✅ Screen reader compatible ✅ Semantic HTML (button, nav, main, header) ✅ Alt text for images ✅ Form labels associated with inputs
❌ Don't use inline styles for complex styling ❌ Don't forget key prop in lists ❌ Don't mutate state directly ❌ Don't skip accessibility features ❌ Don't hardcode API URLs (use environment variables) ❌ Don't skip loading and error states ❌ Don't forget mobile responsiveness
When reading task sections, prioritize:
requirements - What UI needs to be builttechnical-approach - Component structure, state managementdesign - Visual specifications, layoutux - User interactions, flowsFor deeper patterns and examples, see: