description:Specify implementation-level layout, information hierarchy, interactions, components, responsive behavior and UI states within an approved web design direction. Use existing design systems and component patterns, including React-Bootstrap when present. Route BortStack concept exploration, design approval and design handoff to bortstack-design, implementation to webapp-feature, and browser verification to frontend-visual-qa.
---
# Frontend UI Design
Version: **2.0**.
Design the user interface **before implementation interrupts the engineering flow**. Turn a feature/page requirement into an implementation-ready composition: information hierarchy, page regions, actions, responsive behavior, states, suitable reusable components, and accessibility/interaction expectations.
Use `bortstack-design` for BortStack concepts, approval and design handoff. Use `webapp-feature` for authorised implementation and `frontend-visual-qa` for independent browser verification. For project scaffolding, use `roborto-new-project` as the temporary route.
## Repository workflow
In a BortStack project, use `bortstack-context` with the applicable repository `AGENTS.md` before task work. They govern scope and authorisation, branch/worktree policy, lifecycle, manual acceptance, and handoff. Find the maintained overview, current state, decisions, task and handoff records through repository instructions and layout. Use the paths and task IDs the project already uses. Follow context's canonical discussion, mission and lifecycle guidance when interpreting authority or changing task status. If a required BortStack skill is unavailable, report the dependency. If an installed skill lacks a required reference, use the reference from a verified Forge package with a matching manifest. If the required guidance is unavailable, pause the affected action.
For edits, inspect Git status and worktrees, confirm authorised scope and the source candidate, and follow the current branch policy. Use direct integration-branch work where authorised and a dedicated branch/worktree where required. Preserve unrelated work. Read-only specialist work does not require a new worktree. When acting as an authorised contributor, use `bortstack-contributor` for contributor permissions, finalisation and submission. For ordinary specialist work, use the project's normal authority.
When manual testing is relevant, discover the documented commands, configuration and hooks in the target repository. Use its supported workflow, including an existing `testtask` wrapper and its project-specific config or hook where documented. Preserve a working adapter and its supported invocation. Before use, inspect its supported arguments, candidate handling, runtime and cleanup behavior. If no adapter is required, use the established development environment. Record candidate identity, actual checks, limitations and pending human acceptance in the project's handoff. Refresh stale candidates after edits and make fixes in the authoritative source. A source snapshot, wrapper, automated check or startup alone does not establish a manual pass. Follow context and repository rules for task transitions and closure.
Outside BortStack, follow the repository's own scope, branch, test and reporting conventions and proceed with the specialist workflow. BortStack skills and records are optional there.
## Core operating rule
Default to a read-only implementation specification. Start with the project's visual authority, such as approved design source/version, tokens, component and layout guides, and established screens. In BortStack, obtain the approved handoff or confirm a recorded, task-specific override through `bortstack-context` before design-dependent implementation. Route missing direction, material departures, concept alternatives and approval back to `bortstack-design`. A request to design and implement together still follows the project's approval and implementation gates.
Outside BortStack, use the project's design and approval process. If there is no design system, use restrained local component and layout defaults within the user's agreed direction and surface decisions that need agreement.
2.**Design around the user's task, not visual novelty.** Optimize clarity, hierarchy, usability, consistency, responsiveness, and implementation practicality.
3.**Extend before redesigning.** If the application already has an approved visual language, compose the new UI from it. Do not modernize or restyle the application without explicit authorization.
4.**Resolve local defaults within the approved direction.** Use restrained, conventional UI/UX patterns when that direction leaves an implementation detail open.
5.**Prefer existing components.** Reuse shared components and existing React-Bootstrap patterns before proposing new primitives.
6.**React-Bootstrap is the preferred foundation when the repository uses it.** Prefer its layout/form/navigation/feedback primitives and Bootstrap responsive conventions rather than recreating generic UI controls from scratch.
7.**Do not force Bootstrap aesthetics.** React-Bootstrap provides structure and behavior; the project's visual tokens, SCSS/modules, typography, colors, spacing, and established components define the application's identity.
8.**Design all relevant states.** Do not specify only the ideal populated state. Consider loading, empty, error, validation, success, disabled, permission, destructive-confirmation, and responsive states as applicable.
9.**Design responsive behavior explicitly.** State what changes at broad desktop, intermediate/tablet, and narrow/mobile widths where relevant. Do not rely on “Bootstrap will handle it”.
10.**Use semantic interaction patterns.** Buttons should be actions, links should navigate, fields should be labelled, destructive actions should be clear, and clickable containers should not substitute for proper controls without a justified pattern.
11.**Keep cognitive load low.** Prioritize primary actions and information. Do not expose every secondary option at equal visual weight.
12.**Choose patterns based on content and workflow.** Do not default everything to cards, tables, modals, dashboards, tabs, or sidebars.
13.**Avoid premature custom components.** Introduce a reusable component when repeated semantics/behavior justify it, not merely to reduce a few lines of JSX.
14.**Do not invent product behavior.** When the design depends on unresolved business rules, surface the decision rather than encoding an assumption into the UI.
15.**Accessibility is part of design.** Account for labels, keyboard use, focus, semantics, error communication, touch targets, content order, and non-color-only state cues from the outset.
16.**Keep implementation cost visible.** Prefer a simple composition that solves the task over an elaborate design with little user benefit.
17.**Do not commit, push, deploy, switch branches, or perform production actions unless explicitly requested.**
18.**Do not claim the design was visually verified.** That is `frontend-visual-qa`'s job after implementation.
## Determine the design mode
Use one of these modes based on repository evidence.
### Extend mode
Use when the project already has an established or approved UI language.
Inspect and preserve:
- page shell/container widths;
- navigation/header/footer patterns;
- typography hierarchy;
- spacing rhythm;
- color/theme tokens;
- button hierarchy;
- form conventions;
- cards/tables/lists;
- modal/offcanvas patterns;
- empty/loading/error conventions;
- responsive behavior;
- existing reusable components.
The new page should look like it belongs to the same application.
### Local defaults mode
Use when the approved direction leaves component or layout details open.
Specify only the local defaults needed for coherent implementation:
- page container/gutter convention;
- heading hierarchy;
- primary/secondary/destructive action hierarchy;
- form treatment;
- content grouping;
- basic spacing rhythm;
- responsive composition;
- state-feedback conventions.
Do not attempt to create an exhaustive design system unless asked.
## 1. Understand the user's job-to-be-done
Before drawing a layout in prose, determine:
- who uses this page/feature;
- what they are trying to accomplish;
- the primary action;
- secondary actions;
- information required to make the action safely;
- information that is optional/contextual;
- frequency of use;
- whether users scan, compare, edit, create, monitor, or progress through a sequence;
- whether the flow is novice-oriented, expert/data-dense, or mixed;
- key constraints from task/decisions/backend domain.
Do not start by choosing `Card`, `Table`, or `Modal`. Start with the user task and information hierarchy.
- **Exceptional** — destructive, uncommon, advanced, or error-recovery actions.
Use hierarchy to determine placement and visual emphasis. Avoid giving every action the same button weight.
## 4. Select the interaction pattern deliberately
Choose the simplest suitable pattern.
Examples:
### List vs table
Prefer a **table** when users need to compare repeated structured attributes across rows and desktop density matters.
Prefer a **list/card/list-group composition** when entries have heterogeneous content, primary actions, or need to adapt strongly on narrow screens.
If a table is necessary on desktop but becomes unusable on mobile, specify the mobile transformation rather than simply allowing horizontal scrolling by default.
### Inline form vs modal vs dedicated page
Prefer **inline** for short, contextual edits with low interruption cost.
Prefer a **modal** for short, self-contained create/edit actions where preserving page context matters.
Prefer a **dedicated page** for complex, multi-section, high-risk, or deep-linkable forms.
Do not put long workflows in a modal merely to avoid creating a route.
### Tabs
Use tabs when several peer views belong to the same object/context and users frequently switch among them.
Do not use tabs to hide unrelated page sections or create an artificial information architecture.
### Offcanvas
Use for secondary navigation/filter/control surfaces, especially where mobile screen space matters. Do not hide primary actions in an offcanvas without reason.
### Cards
Use cards to represent meaningful grouped units. Do not wrap every section in a card by habit.
See `references/pattern-selection.md` for the decision checklist.
## 5. Compose the page
Specify page regions in reading/task order.
A common structure might be:
```text
Application shell
└── Page container
├── Page heading / context
│ ├── title
│ ├── short supporting copy if useful
│ └── primary action
├── optional controls/filter/search
├── feedback/status region
└── primary content
├── empty/loading/error/populated state
└── secondary actions/details
```
This is a starting vocabulary, not a mandatory template.
For each region state:
- purpose;
- contents;
- action hierarchy;
- alignment/grouping;
- relevant React-Bootstrap primitive or existing project component;
- responsive transformation.
## 6. Use React-Bootstrap intentionally
When the project uses React-Bootstrap, prefer the existing library before custom equivalents.
Important action, keyboard, focus, confirmation, form, and semantic expectations.
### Reuse/new components
What should be reused and any justified new shared component.
### Decisions needed
Only unresolved choices that materially affect UX/implementation.
### Implementation notes
A compact specification that supplements the approved handoff and that `webapp-feature` can use for authorised implementation.
Proceed to implementation only within authorised scope and after the applicable design gate is satisfied.
## 14. When alternatives are useful
If the approved direction leaves a material implementation choice open, offer at most two or three options within it. In BortStack, route options that change the approved concept, product flow or visual direction to `bortstack-design`.
Alternatives must differ in workflow/information architecture, for example:
- dense comparison table vs responsive item-list workflow;
- split master/detail vs dedicated detail route;
- inline management vs modal-based management.
Do not present arbitrary cosmetic variations such as three different card styles.
For each alternative state:
- best fit;
- tradeoff;
- implementation/maintenance complexity;
- mobile implications.
Recommend one when evidence supports a clear choice.
## 15. If implementation is explicitly requested too
When the user explicitly asks to **design and implement** in one request:
1. complete the design reasoning first;
2. record/confirm any required decisions;
3. use `webapp-feature` methodology for implementation;
4. preserve task scope;
5. run automated validation;
6. use/recommend `frontend-visual-qa` for actual visual verification.
Do not silently collapse design and implementation into ad hoc JSX construction.
## 16. Record decisions and evidence
Keep the specification within the authorised scope. Send durable UI decisions and changes in approval back through the project’s decision process. Use `bortstack-context` for task and handoff records in BortStack. Record the approved reference/version or explicit override, open implementation decisions and the evidence needed for later QA.
## 17. Stop conditions
Stop and ask/present a decision when:
- two interaction patterns have materially different product consequences;
- required business rules are unresolved;
- the existing design source of truth conflicts internally;
- a requested design would require removing/changing established functionality;
- a responsive transformation changes what information/actions users can access;
- implementation would require a backend/API capability that does not exist and is outside the task;
- the user requested design-only and the implementation-ready specification is complete.
Do not use uncertainty as an excuse to ask about minor spacing or conventional choices that can be resolved safely from project patterns.
## 18. Completion report
For a design-only task, report:
1. design mode and evidence inspected;
2. user goal and primary action;
3. proposed layout/composition;
4. component/React-Bootstrap plan;
5. responsive behavior;
6. UI state behavior;
7. interaction/accessibility expectations;
8. reusable components proposed;
9. unresolved decisions, if any;
10. recommended next skill: normally `webapp-feature`, followed by `frontend-visual-qa` after implementation.
Do not report code changes when none were requested.
Only include states relevant to the page/workflow.
## Data/display
- initial/default
- loading
- empty
- populated
- partial/incomplete data
- stale/conflict if applicable
## Form/action
- untouched
- editing
- validation failure
- submitting/disabled
- server/network failure
- success/confirmation
- destructive confirmation
## Access
- unauthenticated
- unauthorized/permission denied
- feature unavailable/blocked where legitimate
## Responsive
For each important state, ensure content/action order remains sensible after stacking or collapsing.
## For each state answer
- What does the user see?
- What is the primary available action?
- Can they recover without losing useful work?
- Is status conveyed by more than color alone where needed?
- Does the layout still work with realistic long text/errors/data?
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.