Basic Workflow
Relevant source filesPurpose and Scope
This document describes the typical development workflows and patterns used when building user interfaces with@ui8kit/core. It covers common scenarios developers encounter when composing components, applying styling through the variant system, and building standard UI patterns like cards, forms, and layouts.
For advanced scenarios where standard components are insufficient (e.g., creating custom form components), see Advanced Workflow. For general guidelines and performance recommendations, see Best Practices.
Sources: .devin/wiki.json181-188 src/components/README.md1-259
Component Selection Workflow
The first step in any development workflow is selecting the appropriate component for your use case. The library follows a three-layer hierarchy where each layer serves specific purposes.
Sources: README.md62-103 src/components/README.md9-19 README.md363-387
Basic Styling Workflow
All components accept variant props instead of className strings. This workflow shows how to apply styling through the variant system.Step-by-Step: Styling a Component
Step 1: Apply spacing variantsnone, xs, sm, md, lg, xl, 2xl, auto
Step 2: Apply color variants
Variant Props Reference
Sources: README.md170-217 src/components/README.md206-222
Layout Pattern Workflows
Vertical Stacking with Stack
The most common layout pattern is vertical stacking of elements.
Stack props:
gap: Space between children (xs,sm,md,lg,xl,2xl)align: Cross-axis alignment (start,center,end,stretch)justify: Main-axis alignment (start,center,end,between,around)
Horizontal Layout with Group
For horizontal arrangements, use Group.
Grid Layout with Grid
For multi-column layouts, use Grid with responsive presets.
cols preset values:
"1-2-3": 1 column mobile, 2 tablet, 3 desktop"2": 2 columns at all breakpoints- Custom: Use standard Grid props
Responsive Container
UseContainer for centered, max-width layouts.
xs: 448pxsm: 640pxmd: 768pxlg: 1024pxxl: 1280px
UI Component Patterns
Working with Cards
Card is a compound component with semantic subcomponents.
Working with Buttons
Button supports variants, sizes, loading states, and icon sections.
default: Standard buttonprimary: Primary actionsecondary: Secondary actiondestructive: Dangerous actionsoutline: Outlined styleghost: Minimal stylelink: Link-styled button
Working with Typography
UseTitle for headings and Text for body content.
Title order mapping:
order={1}:<h1>tagorder={2}:<h2>tagorder={3}:<h3>tag- (continues to
order={6})
Working with Badges
UseBadge for status indicators and labels.
default: Standard badgesuccess: Green/positivewarning: Yellow/cautionerror: Red/negativeoutline: Outlined style
Semantic HTML Workflow
UseBlock with the component prop to render semantic HTML5 elements.
section: Thematic groupingarticle: Self-contained contentnav: Navigation linksheader: Introductory contentfooter: Footer contentaside: Sidebar contentmain: Main content area
Common Development Scenarios
Scenario 1: Building a Feature Card
Scenario 2: Building a Form Layout
When form-specific components are not available, compose layouts usingBlock and Box.
Scenario 3: Building a Dashboard Section
Scenario 4: Responsive Navigation
Data Attribute Targeting
All UI components includedata-class attributes for semantic targeting in CSS and tests.
Workflow Summary Table
Sources: src/components/README.md1-259 README.md36-217