Epic Ui Guidelines logo

Epic Ui Guidelines

OrganizationPopular
epicweb-dev
epic-ui-guidelines

Guide on UI/UX guidelines, accessibility, and component usage for Epic Stack

Overview

Publisherepicweb-dev
Repositoryepic-stack
Skill nameepic-ui-guidelines
Stars
5.5K
Forks
461
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by epicweb-dev on GitHub. Read the source before you install it.

Installation

Install the Epic Ui Guidelines AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/epicweb-dev/epic-stack.git /tmp/epic-stack
mkdir -p .claude/skills
cp -r /tmp/epic-stack/docs/skills/epic-ui-guidelines .claude/skills/epic-ui-guidelines
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Epic Ui Guidelines in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Epic Ui Guidelines on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Epic Ui Guidelines is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Epic Stack: UI Guidelines

When to use this skill

Use this skill when you need to:

  • Create accessible UI components
  • Follow Epic Stack design patterns
  • Use Tailwind CSS effectively
  • Implement semantic HTML
  • Add ARIA attributes correctly
  • Create responsive layouts
  • Ensure proper form accessibility
  • Follow Epic Stack's UI component conventions

Patterns and conventions

UI Philosophy

Following Epic Web principles:

Software is built for people, by people - Accessibility isn't about checking boxes or meeting standards. It's about creating software that works for real people with diverse needs, abilities, and contexts. Every UI decision should prioritize the human experience over technical convenience.

Accessibility is not optional - it's how we ensure our software serves all users, not just some. When you make UI accessible, you're making it better for everyone: clearer labels help all users, keyboard navigation helps power users, and semantic HTML helps search engines.

Example - Human-centered approach:

typescript
// ✅ Good - Built for people
function NoteForm() {
	return (
		<Form method="POST">
			<Field
				labelProps={{
					htmlFor: fields.title.id,
					children: 'Note Title', // Clear, human-readable label
				}}
				inputProps={{
					...getInputProps(fields.title),
					placeholder: 'Enter a descriptive title', // Helpful guidance
					autoFocus: true, // Saves time for users
				}}
				errors={fields.title.errors} // Clear error messages
			/>
		</Form>
	)
}

// ❌ Avoid - Technical convenience over user experience
function NoteForm() {
	return (
		<Form method="POST">
			<input name="title" /> {/* No label, no guidance, no accessibility */}
		</Form>
	)
}

Semantic HTML

✅ Good - Use semantic elements:

typescript
function UserCard({ user }: { user: User }) {
	return (
		<article>
			<header>
				<h2>{user.name}</h2>
			</header>
			<p>{user.bio}</p>
			<footer>
				<time dateTime={user.createdAt}>{formatDate(user.createdAt)}</time>
			</footer>
		</article>
	)
}

❌ Avoid - Generic divs:

typescript
// ❌ Don't use divs for everything
<div>
	<div>{user.name}</div>
	<div>{user.bio}</div>
	<div>{formatDate(user.createdAt)}</div>
</div>

Form Accessibility

✅ Good - Always use labels:

typescript
import { Field } from '#app/components/forms.tsx'

<Field
	labelProps={{
		htmlFor: fields.email.id,
		children: 'Email',
	}}
	inputProps={{
		...getInputProps(fields.email, { type: 'email' }),
		autoFocus: true,
		autoComplete: 'email',
	}}
	errors={fields.email.errors}
/>

The Field component automatically:

  • Associates labels with inputs using htmlFor and id
  • Adds aria-invalid when there are errors
  • Adds aria-describedby pointing to error messages
  • Ensures proper error announcement

❌ Avoid - Unlabeled inputs:

typescript
// ❌ Don't forget labels
<input type="email" name="email" />

ARIA Attributes

✅ Good - Use ARIA appropriately:

typescript
// Epic Stack's Field component handles this automatically
<Field
	inputProps={{
		...getInputProps(fields.email, { type: 'email' }),
		// aria-invalid and aria-describedby are added automatically
	}}
	errors={fields.email.errors} // Error messages are linked via aria-describedby
/>

✅ Good - ARIA for custom components:

typescript
function LoadingButton({ isLoading, children }: { isLoading: boolean; children: React.ReactNode }) {
	return (
		<button aria-busy={isLoading} disabled={isLoading}>
			{isLoading ? 'Loading...' : children}
		</button>
	)
}

Using Radix UI Components

Epic Stack uses Radix UI for accessible, unstyled components.

✅ Good - Use Radix primitives:

typescript
import * as Dialog from '@radix-ui/react-dialog'
import { Button } from '#app/components/ui/button.tsx'

function MyDialog() {
	return (
		<Dialog.Root>
			<Dialog.Trigger asChild>
				<Button>Open Dialog</Button>
			</Dialog.Trigger>
			<Dialog.Portal>
				<Dialog.Overlay className="fixed inset-0 bg-black/50" />
				<Dialog.Content className="fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 bg-white p-6">
					<Dialog.Title>Dialog Title</Dialog.Title>
					<Dialog.Description>Dialog description</Dialog.Description>
					<Dialog.Close asChild>
						<Button>Close</Button>
					</Dialog.Close>
				</Dialog.Content>
			</Dialog.Portal>
		</Dialog.Root>
	)
}

Radix components automatically handle:

  • Keyboard navigation
  • Focus management
  • ARIA attributes
  • Screen reader announcements

Tailwind CSS Patterns

✅ Good - Use Tailwind utility classes:

typescript
function Card({ children }: { children: React.ReactNode }) {
	return (
		<div className="rounded-lg border border-gray-200 bg-white p-6 shadow-sm">
			{children}
		</div>
	)
}

✅ Good - Use Tailwind responsive utilities:

typescript
<div className="grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3">
	{items.map(item => (
		<Card key={item.id}>{item.name}</Card>
	))}
</div>

✅ Good - Use Tailwind dark mode:

typescript
<div className="bg-white text-gray-900 dark:bg-gray-800 dark:text-gray-100">
	{content}
</div>

Error Handling in Forms

✅ Good - Display errors accessibly:

typescript
import { Field, ErrorList } from '#app/components/forms.tsx'

<Field
	labelProps={{ htmlFor: fields.email.id, children: 'Email' }}
	inputProps={getInputProps(fields.email, { type: 'email' })}
	errors={fields.email.errors} // Errors are displayed below input
/>

<ErrorList errors={form.errors} id={form.errorId} /> // Form-level errors

Errors are automatically:

  • Associated with inputs via aria-describedby
  • Announced to screen readers
  • Visually distinct with error styling

Focus Management

✅ Good - Visible focus indicators:

typescript
// Tailwind's default focus:ring handles this
<button className="focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2">
	Click me
</button>

✅ Good - Focus on form errors:

typescript
import { useEffect, useRef } from 'react'

function FormWithErrorFocus() {
	const firstErrorRef = useRef<HTMLInputElement>(null)

	useEffect(() => {
		if (actionData?.errors && firstErrorRef.current) {
			firstErrorRef.current.focus()
		}
	}, [actionData?.errors])

	return <Field inputProps={{ ref: firstErrorRef, ... }} />
}

Keyboard Navigation

✅ Good - Keyboard accessible components:

typescript
// Radix components handle keyboard navigation automatically
<Dialog.Trigger asChild>
	<Button>Open</Button>
</Dialog.Trigger>

// Custom components should support keyboard
<button
	onKeyDown={(e) => {
		if (e.key === 'Enter' || e.key === ' ') {
			handleClick()
		}
	}}
>
	Custom Button
</button>

Color Contrast

✅ Good - Use accessible color combinations:

typescript
// Use Tailwind's semantic colors that meet WCAG AA
<div className="bg-white text-gray-900"> // High contrast
<div className="text-blue-600 hover:text-blue-700"> // Accessible links

❌ Avoid - Low contrast text:

typescript
// ❌ Don't use low contrast
<div className="bg-gray-100 text-gray-200"> // Very low contrast

Responsive Design

✅ Good - Mobile-first approach:

typescript
<div className="
	flex flex-col gap-4
	md:flex-row md:gap-8
	lg:gap-12
">
	{/* Content */}
</div>

✅ Good - Responsive typography:

typescript
<h1 className="text-2xl md:text-3xl lg:text-4xl">
	Responsive Heading
</h1>

Loading States

✅ Good - Accessible loading indicators:

typescript
import { useNavigation } from 'react-router'

function SubmitButton() {
	const navigation = useNavigation()
	const isSubmitting = navigation.state === 'submitting'

	return (
		<button
			type="submit"
			disabled={isSubmitting}
			aria-busy={isSubmitting}
		>
			{isSubmitting ? 'Saving...' : 'Save'}
		</button>
	)
}

Icon Usage

✅ Good - Decorative icons:

typescript
import { Icon } from '#app/components/ui/icon.tsx'

<button aria-label="Delete note">
	<Icon name="trash" />
	<span className="sr-only">Delete note</span>
</button>

✅ Good - Semantic icons:

typescript
<button>
	<Icon name="check" aria-hidden="true" />
	Save
</button>

Skip Links

✅ Good - Add skip to main content:

typescript
// In your root layout
<a href="#main-content" className="sr-only focus:not-sr-only focus:absolute focus:top-0 focus:left-0 focus:z-50 focus:p-4 focus:bg-blue-600 focus:text-white">
	Skip to main content
</a>

<main id="main-content">
	{/* Main content */}
</main>

Progressive Enhancement

✅ Good - Forms work without JavaScript:

typescript
// Conform forms work without JavaScript
<Form method="POST" {...getFormProps(form)}>
	<Field {...props} />
	<StatusButton type="submit">Submit</StatusButton>
</Form>

Forms automatically:

  • Submit via native HTML forms if JavaScript is disabled
  • Validate server-side
  • Show errors appropriately

Screen Reader Best Practices

✅ Good - Use semantic HTML first:

typescript
// ✅ Semantic HTML provides context automatically
<nav aria-label="Main navigation">
	<ul>
		<li><a href="/">Home</a></li>
		<li><a href="/about">About</a></li>
	</ul>
</nav>

✅ Good - Announce dynamic content:

typescript
import { useNavigation } from 'react-router'

function SearchResults({ results }: { results: Result[] }) {
	const navigation = useNavigation()
	const isSearching = navigation.state === 'loading'

	return (
		<div
			role="status"
			aria-live="polite"
			aria-atomic="true"
			className="sr-only"
		>
			{isSearching ? 'Searching...' : `${results.length} results found`}
		</div>
	)
}

✅ Good - Live regions for important updates:

typescript
function ToastContainer({ toasts }: { toasts: Toast[] }) {
	return (
		<div aria-live="assertive" aria-atomic="true" className="sr-only">
			{toasts.map(toast => (
				<div key={toast.id} role="alert">
					{toast.message}
				</div>
			))}
		</div>
	)
}

ARIA live region options:

  • aria-live="polite" - For non-critical updates (search results, status messages)
  • aria-live="assertive" - For critical updates (errors, confirmations)
  • aria-atomic="true" - Screen reader reads entire region on update
  • aria-atomic="false" - Screen reader reads only changed parts

Keyboard Navigation Patterns

✅ Good - Tab order follows visual order:

typescript
// Elements appear in logical tab order
<nav>
	<a href="/">Home</a>
	<a href="/about">About</a>
	<a href="/contact">Contact</a>
</nav>

✅ Good - Keyboard shortcuts:

typescript
import { useEffect } from 'react'

function SearchDialog({ onClose }: { onClose: () => void }) {
	useEffect(() => {
		function handleKeyDown(e: KeyboardEvent) {
			if (e.key === 'Escape') {
				onClose()
			}
		}

		window.addEventListener('keydown', handleKeyDown)
		return () => window.removeEventListener('keydown', handleKeyDown)
	}, [onClose])

	return <Dialog>{/* content */}</Dialog>
}

✅ Good - Focus trap in modals:

typescript
// Radix Dialog automatically handles focus trap
<Dialog.Root>
	<Dialog.Content>
		{/* Focus is trapped inside dialog */}
		<Dialog.Close>Close</Dialog.Close>
	</Dialog.Content>
</Dialog.Root>

Focus Management for React Router

✅ Good - Focus on route changes:

typescript
import { useEffect } from 'react'
import { useNavigation } from 'react-router'

function RouteComponent() {
	const navigation = useNavigation()
	const mainRef = useRef<HTMLElement>(null)

	useEffect(() => {
		if (navigation.state === 'idle' && mainRef.current) {
			mainRef.current.focus()
		}
	}, [navigation.state])

	return (
		<main ref={mainRef} tabIndex={-1}>
			{/* Content */}
		</main>
	)
}

✅ Good - Focus on errors:

typescript
import { useEffect, useRef } from 'react'

function FormWithErrorFocus({ actionData }: Route.ComponentProps) {
	const firstErrorRef = useRef<HTMLInputElement>(null)

	useEffect(() => {
		if (actionData?.errors && firstErrorRef.current) {
			// Focus first error field
			firstErrorRef.current.focus()
			// Announce error
			firstErrorRef.current.setAttribute('aria-invalid', 'true')
		}
	}, [actionData?.errors])

	return <Field inputProps={{ ref: firstErrorRef, ... }} />
}

Typography and Readability

✅ Good - Readable text sizes:

typescript
// Use Tailwind's text size scale
<p className="text-base md:text-lg">Readable body text</p>
<h1 className="text-2xl md:text-3xl lg:text-4xl">Clear headings</h1>

✅ Good - Sufficient line height:

typescript
// Tailwind defaults provide good line height
<p className="leading-relaxed">Comfortable reading</p>

❌ Avoid - Small or hard-to-read text:

typescript
// ❌ Don't use very small text
<p className="text-xs">Hard to read</p>

Touch Target Sizes

✅ Good - Sufficient touch targets:

typescript
// Buttons should be at least 44x44px (touch target size)
<button className="min-h-[44px] min-w-[44px] px-4 py-2">
	Click me
</button>

✅ Good - Spacing between interactive elements:

typescript
<div className="flex gap-4">
	<Button>Save</Button>
	<Button>Cancel</Button>
</div>

Internationalization (i18n) Considerations

✅ Good - Use semantic HTML for dates/times:

typescript
<time dateTime={note.createdAt.toISOString()}>
	{formatDate(note.createdAt)}
</time>

✅ Good - Use semantic HTML for numbers:

typescript
// Screen readers can pronounce numbers correctly
<p>Total: <span aria-label={`${count} items`}>{count}</span></p>

✅ Good - Language attributes:

typescript
// In root.tsx
<html lang="en">
	<body>
		{/* Content */}
	</body>
</html>

Dark Mode Accessibility

✅ Good - Maintain contrast in dark mode:

typescript
// Ensure sufficient contrast in both modes
<div className="bg-white text-gray-900 dark:bg-gray-900 dark:text-gray-100">
	{content}
</div>

✅ Good - Respect user preference:

typescript
// Epic Stack automatically handles theme preference
// Use semantic colors that work in both modes
<button className="bg-blue-600 text-white hover:bg-blue-700 dark:bg-blue-500 dark:hover:bg-blue-600">
	Button
</button>

Animation and Motion

✅ Good - Respect reduced motion:

typescript
// Tailwind automatically respects prefers-reduced-motion
<div className="transition-transform duration-200 hover:scale-105 motion-reduce:transition-none">
	{/* Animations disabled for users who prefer reduced motion */}
</div>

✅ Good - Use CSS for animations:

typescript
// ✅ CSS animations can be disabled via prefers-reduced-motion
<div className="animate-fade-in">
	{/* Content */}
</div>

// ❌ JavaScript animations may not respect user preferences

Common mistakes to avoid

  • Treating accessibility as a checklist: Accessibility is about serving real people, not just meeting standards
  • Missing form labels: Always use Field component which includes labels - helps all users, not just screen reader users
  • Using divs for semantic elements: Use <article>, <header>, <nav>, etc. - helps all users understand content structure
  • Ignoring keyboard navigation: Ensure all interactive elements are keyboard accessible - helps power users and those who can't use a mouse
  • Low color contrast: Test color combinations for WCAG AA compliance - helps users with visual impairments and in bright sunlight
  • Missing ARIA attributes: Use Epic Stack components which handle this automatically
  • Breaking focus management: Let Radix components handle focus
  • Not testing with screen readers: Test with VoiceOver, NVDA, or JAWS - understand how real users experience your UI
  • Hiding content from screen readers: Use sr-only instead of display: none for screen reader only content
  • Ignoring mobile users: Always test on mobile devices - many users only have mobile access
  • Not using Tailwind's responsive utilities: Use mobile-first responsive design
  • Not using live regions: Use aria-live for dynamic content announcements
  • Small touch targets: Ensure interactive elements are at least 44x44px - helps users with motor impairments and on mobile
  • Ignoring reduced motion: Respect prefers-reduced-motion media query - helps users with vestibular disorders
  • Poor focus indicators: Ensure focus is always visible - helps keyboard users navigate
  • Missing skip links: Add skip to main content links for keyboard users

References

Frequently asked questions

What does the Epic Ui Guidelines AI skill do?

Guide on UI/UX guidelines, accessibility, and component usage for Epic Stack

Why use Epic Ui Guidelines on TypingMind?

Because you install it once and use it with any model. Epic Ui Guidelines is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Epic Ui Guidelines in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/epicweb-dev/epic-stack/tree/main/docs/skills/epic-ui-guidelines. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Epic Ui Guidelines?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Epic Ui Guidelines?

As many as you like. As long as a model supports skills, you can use Epic Ui Guidelines with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Epic Ui Guidelines AI skill free?

Yes. It is published on GitHub by epicweb-dev under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇