0Pricing
Design Systems & Component Libraries · บทเรียน

ระยะห่าง การจัดวาง และสัญลักษณ์

พัฒนากฎสำหรับระยะห่างและการจัดวางแบบตาราง พร้อมสร้างชุดไอคอนที่ขยายได้เพื่อรักษาความกลมกลืนทางภาพในทุกการออกแบบ

ระยะห่าง การจัดวาง และสัญลักษณ์ เป็นบทเรียน Design Systems & Component Libraries ฟรีบน CoddyKit นี่คือบทเรียนที่ 2 จากทั้งหมด 4 บทเรียน คุณสามารถอ่านบทเรียนทั้งหมดด้านล่างฟรี — จากนั้นลองปฏิบัติด้วยตัวคุณเองในเบราว์เซอร์พร้อมตัวแก้ไขโค้ดในตัวและติวเตอร์ AI ตลอด 24/7 บทเรียนนี้เป็นส่วนหนึ่งของเส้นทางการเรียน Design Systems & Component Libraries และความก้าวหน้าของคุณจะซิงค์ข้ามเว็บและแอป CoddyKit คอร์ส Design Systems & Component Libraries มีบทเรียนทั้งหมด 4 บทเรียน

บางส่วนของบทเรียนนี้ยังไม่ได้รับการแปล และแสดงเป็นภาษาอังกฤษ

Visual Harmony for Users

Ever noticed how some apps just feel "right" to use? Often, it's thanks to thoughtful design choices.

In this lesson, we'll explore three pillars of visual harmony: consistent spacing, effective layout, and clear iconography. These elements work together to create a predictable and pleasant user experience.

The Power of White Space

Spacing, also known as "white space" or "negative space," is the empty area between design elements.

  • It improves readability by separating content.
  • It guides the user's eye, creating visual hierarchy.
  • It reduces cognitive load, making interfaces feel less cluttered.

Think of it as the air around your content!

Building a Spacing System

To achieve consistency, design systems often use a base unit for all spacing values. A common choice is 8 pixels (8px) or 4 pixels (4px).

All margins, paddings, and gaps then become multiples of this base unit (e.g., 8px, 16px, 24px, 32px). This creates a predictable rhythm and ensures elements always align nicely.

/* Example using an 8px base unit */
.card {
  padding: 16px; /* 2 * 8px */
  margin-bottom: 24px; /* 3 * 8px */
}

.button {
  margin-right: 8px; /* 1 * 8px */
}

Inner vs. Outer Space

It's crucial to understand the difference between padding and margin.

  • Padding is the space inside an element, between its content and its border.
  • Margin is the space outside an element, separating it from other elements.

Using them correctly helps control how elements interact visually.

<style>
  .box {
    border: 1px solid blue;
    background-color: lightblue;
    width: 100px;
    height: 50px;
    margin: 10px; /* Space outside the box */
    padding: 20px; /* Space inside the box */
  }
</style>
<div class="box">Content</div>

Structuring Your Content

Layout refers to the arrangement of elements on a page. A good layout makes content easy to scan and understand, guiding users through the information.

It defines how different sections, components, and text blocks are positioned relative to each other, creating a clear visual hierarchy and flow.

The Grid: Your Design Backbone

Grid systems are frameworks that help designers and developers arrange content in a consistent and organized way. They typically divide a page into columns and rows.

A common example is a 12-column grid. This flexible structure allows for many different content arrangements while ensuring everything stays aligned.

<style>
  .grid-container {
    display: grid;
    grid-template-columns: repeat(12, 1fr); /* 12 equal columns */
    gap: 16px; /* Gutter between columns */
    border: 1px dashed gray;
  }
  .col-4 {
    grid-column: span 4; /* Element spans 4 columns */
    background-color: #e0e0e0;
    padding: 8px;
  }
</style>
<div class="grid-container">
  <div class="col-4">Item 1</div>
  <div class="col-4">Item 2</div>
  <div class="col-4">Item 3</div>
</div>

Layouts for Every Screen

A key aspect of modern layouts is responsiveness. This means your design should adapt and look great on any screen size, from small phones to large desktop monitors.

Grid systems and flexible spacing rules are fundamental to building responsive interfaces. They allow elements to rearrange, resize, or stack as the available screen space changes.

Icons: Universal Visual Cues

Icons are small graphical symbols used to represent actions, objects, or ideas. They are powerful tools in a design system because:

  • They convey meaning quickly, often faster than text.
  • They save screen space, especially on mobile.
  • They enhance navigation and user recognition.

A well-chosen icon can speak volumes!

Crisp Icons, Any Size

For icons to look great on any device, they need to be scalable. Two popular formats ensure this:

  • SVG (Scalable Vector Graphics): Vector-based, meaning they don't pixelate when scaled. Highly flexible.
  • Icon Fonts: Collections of icons delivered as a font. Easy to color and resize with CSS, but limited in complexity.

SVGs are generally preferred for their flexibility and quality.

<!-- Example of an SVG icon -->
<svg width="24" height="24" viewBox="0 0 24 24" fill="currentColor">
  <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/>
</svg>

Spacing & Layout Check

Test your knowledge on how spacing and layout contribute to a good user experience.

Mastering Visual Foundations

In this lesson, we explored how spacing, layout, and iconography are critical for creating visually harmonious and user-friendly interfaces.

  • Consistent spacing creates visual rhythm.
  • Grid layouts organize content and aid responsiveness.
  • Scalable icons provide clear visual cues.

These elements form the bedrock of a strong visual language in any design system.

คำถามที่พบบ่อย

บทเรียน “ระยะห่าง การจัดวาง และสัญลักษณ์” ฟรีหรือไม่

ใช่ — ข้อความเต็มของ “ระยะห่าง การจัดวาง และสัญลักษณ์” ฟรีให้อ่านที่นี่บนเว็บ เพื่อปฏิบัติแบบโต้ตอบ (ตัวแก้ไขโค้ดในตัวและติวเตอร์ AI ตลอด 24/7) และปลดล็อคส่วนที่เหลือของคอร์ส Design Systems & Component Libraries ให้อัปเกรดเป็น CoddyKit PRO คอร์ส Design Systems & Component Libraries มีบทเรียนทั้งหมด 4 บทเรียน

คุณจะเรียนรู้อะไรในบทเรียน “ระยะห่าง การจัดวาง และสัญลักษณ์”

พัฒนากฎสำหรับระยะห่างและการจัดวางแบบตาราง พร้อมสร้างชุดไอคอนที่ขยายได้เพื่อรักษาความกลมกลืนทางภาพในทุกการออกแบบ คุณปฏิบัติ Design Systems & Component Libraries ด้วยโค้ดที่ใช้งานได้จริงที่คุณเรียกใช้โดยตรงในเบราว์เซอร์ และติวเตอร์ AI ตลอด 24/7 ตอบคำถามของคุณขณะที่คุณไปผ่านบทเรียน

คุณต้องมีประสบการณ์ก่อนที่จะเริ่มเรียน Design Systems & Component Libraries หรือไม่

ไม่จำเป็นต้องมีประสบการณ์มาก่อน Design Systems & Component Libraries บน CoddyKit ออกแบบมาสำหรับผู้เริ่มต้นไปจนถึงผู้เรียนขั้นสูง คุณสามารถเริ่มต้นที่นี่หรือเริ่มจากตัวแรกและเรียนด้วยความเร็วของคุณเอง นี่คือบทเรียนที่ 2 จากทั้งหมด 4 บทเรียน

บทเรียน “ระยะห่าง การจัดวาง และสัญลักษณ์” ใช้เวลานานแค่ไหน

บทเรียน CoddyKit ส่วนใหญ่ใช้เวลาประมาณ 5–10 นาที แต่ละบทเรียนจึงสั้นและเป็นแบบโต้ตอบ คุณสามารถก้าวหน้าอย่างต่อเนื่องและกลับมาเรียนต่อจากตรงที่เพิ่งหยุดบนเว็บและแอปได้เลย

ฉันเขียนและรันโค้ดในบทเรียน Design Systems & Component Libraries นี้ได้ไหม

ได้ บทเรียน Design Systems & Component Libraries ทุกบทมีตัวแก้ไขโค้ดในตัว คุณจึงเขียนและรันโค้ดจริงได้เลยในเบราว์เซอร์ และได้รับข้อเสนอแนะจาก AI ในทันที — ไม่ต้องติดตั้งในเครื่องของคุณ

บทเรียนทั้งหมดในหลักสูตรนี้

  1. ชุดสีและการจัดรูปแบบตัวอักษร
  2. ระยะห่าง การจัดวาง และสัญลักษณ์
  3. การสร้างคู่มือรูปแบบภาพ
  4. การออกแบบสำหรับโหมดมืดและธีม
← กลับไปที่ Design Systems & Component Libraries