L
LLLOS.ai
Career
L
◆ AI Learning · Hard rule

What are the essential rules for designing a user interface?

A user interface must follow specific rules for layout and interaction. These rules ensure a consistent and usable experience. They define how elements like grids, cards, and buttons behave.

By Pawan Nayar · from the LLOS AI Learning record

The rule

A user interface must follow specific rules for layout and interaction.

These rules ensure a consistent and usable experience. They define how elements like grids, cards, and buttons behave.

A grid layout uses `display:grid` and `grid-template-columns:minmax(0,1fr)`. It sets a `gap:16px` between items. This creates a flexible column structure. Filter chips should wrap to the next line. Use `flex-wrap:wrap` and `gap:8px` for spacing. This keeps the layout clean. Cards must fit their container. Set `max-width:100%` and `overflow-wrap:anywhere`. This prevents content from breaking the layout. Tap targets, like buttons, must be at least 44x44 pixels. This makes them easy for a user to press. A sticky footer stays at the bottom of the screen. It uses `position:sticky` and `bottom:0`. Add `padding:12px 16px` for spacing. Submit buttons should fit their content. Use `flex:0 0 auto` and `padding:12px 24px`. This makes the button size correct. A timer pill should have stable numbers. Use `font-variant-numeric: tabular-nums`. This stops numbers from moving around. The interface must not have horizontal scrolling. This applies at all screen widths. A user should only scroll vertically.

A developer is building a new web page. The developer ensures all buttons are at least 44x44 pixels. This makes the buttons easy for a user to tap on a mobile phone.

Words you'll need

Resolved from this lesson's own record — real definitions, not invented for this page.

Human-Computer Interaction

How people and computers communicate and work together

Feedback Mechanisms

Ways to tell AI if it got it right or wrong

Design Patterns

Reusable solutions to common problems in design

Information Architecture

How information is organized and labeled so people find it

Questions people ask

More from the same record, pulled by shared topic — not written new for this page.

How can a developer make sure a mobile application's layout looks correct on all devices?

A developer must prevent horizontal scrolling on mobile. Use `max-width: 100%; overflow-x: hidden;` for the main page elements.

How should a developer build web pages to work on both mobile phones and desktop computers?

A developer should always start designing for mobile phones. The page must fit a 320-pixel screen width without horizontal scrolling.

What are the rules for designing and building web pages for a large system?

A design system is a set of rules for creating web pages. These rules tell a developer how to use fonts and text sizes.

How long should text be in a user interface panel?

A panel is a box that holds text on a screen. The text in a panel should be very short or quite long.

What to remember

A user interface must follow specific rules for layout and interaction. These rules ensure a consistent and usable experience. They define how elements like grids, cards, and buttons behave.