Langsung ke konten
Skillpedia
Website & UI (frontend)107k Β· #772

frontend-ui-engineering

Fungsinya

Alat ini membantu membangun antarmuka pengguna (layar dan komponen) untuk website dan aplikasi yang terlihat seperti dibuat oleh engineer berpengalaman. Alat ini memastikan semuanya dapat diakses oleh semua orang, berfungsi dengan baik di berbagai ukuran layar, dan memiliki tampilan yang profesional.

Kapan dipakai

  • βœ“Saat membuat layar atau tombol baru.
  • βœ“Saat menyesuaikan tampilan halaman yang sudah ada.
  • βœ“Saat Anda ingin website berfungsi dengan baik di ponsel dan desktop.

Link skill

https://github.com/addyosmani/agent-skills/blob/main/skills/frontend-ui-engineering/SKILL.md

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/addyosmani/agent-skills/blob/main/skills/frontend-ui-engineering/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit β†’

Contoh permintaan ke AI

β€œBuat tombol 'simpan' untuk formulir pendaftaran, pastikan mudah diklik di ponsel.”

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Alat ini menyusun kode secara logis, memisahkan tampilan dari logika. Alat ini juga menggunakan pola desain yang sudah mapan dan mengikuti aturan aksesibilitas untuk menjaga kualitas.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.

Frontend UI Engineering

Overview

Build production-quality user interfaces that are accessible, performant, and visually polished. The goal is UI that looks like it was built by a design-aware engineer at a top company β€” not like it was generated by an AI. This means real design system adherence, proper accessibility, thoughtful interaction patterns, and no generic "AI aesthetic."

When to Use

  • Building new UI components or pages
  • Modifying existing user-facing interfaces
  • Implementing responsive layouts
  • Adding interactivity or state management
  • Fixing visual or UX issues

Component Architecture

File Structure

Colocate everything related to a component:

src/components/
  TaskList/
    TaskList.tsx          # Component implementation
    TaskList.test.tsx     # Tests
    TaskList.stories.tsx  # Storybook stories (if using)
    use-task-list.ts      # Custom hook (if complex state)
    types.ts              # Component-specific types (if needed)

Component Patterns

Prefer composition over configuration:

// Good: Composable
<Card>
  <CardHeader>
    <CardTitle>Tasks</CardTitle>
  </CardHeader>
  <CardBody>
    <TaskList tasks={tasks} />
  </CardBody>
</Card>

// Avoid: Over-configured
<Card
  title="Tasks"
  headerVariant="large"
  bodyPadding="md"
  content={<TaskList tasks={tasks} />}
/>

Keep components focused:

// Good: Does one thing
export function TaskItem({ task, onToggle, onDelete }: TaskItemProps) {
  return (
    <li className="flex items-center gap-3 p-3">
      <Checkbox checked={task.done} onChange={() => onToggle(task.id)} />
      <span className={task.done ? 'line-through text-muted' : ''}>{task.title}</span>
      <Button variant="ghost" size="sm" onClick={() => onDelete(task.id)}>
        <TrashIcon />
      </Button>
    </li>
  );
}

Separate data fetching from presentation:

// Container: handles data
export function TaskListContainer() {
  const { tasks, isLoading, error, refetch } = useTasks();

  if (isLoading) return <TaskListSkeleton />;
  if (error) return <ErrorState message="Failed to load tasks" retry={refetch} />;
  if (tasks.length === 0) return <EmptyState message="No tasks yet" />;

  return <TaskList tasks={tasks} />;
}

// Presentation: handles rendering
export function TaskList({ tasks }: { tasks: Task[] }) {
  return (
    <ul role="list" className="divide-y">
      {tasks.map(task => <TaskItem key={task.id} task={task} />)}
    </ul>
  );
}

State Management

Choose the simplest approach that works:

Local state (useState)           β†’ Component-specific UI state
Lifted state                     β†’ Shared between 2-3 sibling components
Context                          β†’ Theme, auth, locale (read-heavy, write-rare)
URL state (searchParams)         β†’ Filters, pagination, shareable UI state
Server state (React Query, SWR)  β†’ Remote data with caching
Global store (Zustand, Redux)    β†’ Complex client state shared app-wide

Avoid prop drilling deeper than 3 levels. If you're passing props through components that don't use them, introduce context or restructure the component tree.

Design System Adherence

Reference-led UI quality

When the product needs a distinct visual direction, collect evidence before choosing a layout:

  1. Search a trusted reference catalogue or use references supplied by the product team.
  2. Study two or three relevant screens. Record decisions about hierarchy, density, navigation, controls, responsive behavior, and interaction states.
  3. Turn those decisions into a short design contract before implementation. Name the screen's job, primary action, required states, responsive rules, and patterns to reject.
  4. Rebuild the useful structure in the product's own components, tokens, content, and visual language. Never copy another product's branding, proprietary text, imagery, or exact layout.

Use references as evidence, not as templates. If references are unavailable, document the assumptions and verify the result against the product's existing design system.

Avoid the AI Aesthetic

AI-generated UI has recognizable patterns. Avoid all of them:

AI Default Why It Is a Problem Production Quality
Purple/indigo everything Models default to visually "safe" palettes, making every app look identical Use the project's actual color palette

…

Pertanyaan umum

Apa arti 'accessible'?

Artinya antarmuka dapat digunakan oleh semua orang, termasuk mereka yang memiliki gangguan penglihatan atau motorik, dengan menggunakan pembaca layar atau teknologi bantu lainnya.

Apa arti 'responsive'?

Yaitu ketika antarmuka otomatis menyesuaikan diri dengan berbagai ukuran layar, seperti ponsel, tablet, dan komputer, sehingga semuanya tetap mudah dibaca dan digunakan.

Mengapa harus menghindari 'AI aesthetic'?

Antarmuka buatan AI sering memakai warna, bentuk, dan jarak yang generik yang tidak sesuai dengan desain profesional. Alat ini berfokus pada pembuatan tampilan yang berkualitas tinggi dan selaras dengan proyek.

Detail

Deskripsi asli dari pembuat

Builds production-quality, accessible, responsive user-facing UIs. Use when building or modifying interfaces and pages, creating components, implementing layouts, meeting WCAG accessibility requirements, managing state, or when the output needs to look and feel production-quality rather than AI-generated.

repo: addyosmani/agent-skills

Popularitas

Bintang GitHub
107k
Peringkat
#772
Lisensi
MIT
Diperbarui
13/10/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • …

Skill lain dari repositori ini

Skill serupa