askrobots / dbbasic-web-native
Public
100+ copy-paste UI components in plain HTML and CSS: no dependencies, no build step.
danq9
Add canonical.html v1.0 - The single source of truth for usability standards
fb6e650
1 year ago
History
NATIVE-COMPONENT-ANALYSIS.md · 8.4 KB · 278 lines
Native Platform Component Analysis
Components Missing from Bootstrap/Web Frameworks
iOS/macOS (UIKit/AppKit/SwiftUI)
Navigation & Structure:
UISplitViewController- Adaptive multi-pane layouts (like Settings app)UIPageViewController- Swipeable pages with page indicatorsUINavigationBarwith large titlesUITabBarwith haptic feedbackUIToolbarwith flexible/fixed spacing- Context menus (long-press, right-click)
- Pull-down menus on buttons
- Popovers with arrow positioning
Input Controls:
UISegmentedControl- Mutually exclusive optionsUIStepper- Increment/decrement numeric valuesUISliderwith min/max images and live value displayUISwitch- Toggle with smooth animationUIDatePicker- Wheels or calendar pickerUIColorPicker- Native color selectionUISearchBarwith scopes and tokens- Multi-line text with smart suggestions
- Form validation with inline errors
Display Components:
UIActivityIndicatorView- Loading spinnersUIProgressView- Determinate progressUIPageControl- Page dotsUIRefreshControl- Pull to refreshUIStackView- Auto-layout containersUICollectionViewwith compositional layoutsUITableViewwith swipe actions- Expandable/collapsible sections
- Empty state views
Feedback:
UIAlertControllerwith multiple actions- Action sheets (bottom sheet on iOS)
- Toast/banner notifications
- Haptic feedback engine
- System sounds
Advanced:
- Drag and drop
- Contextual actions (swipe to delete)
- Quick actions (3D Touch/long press)
- Share sheets
- Document picker
- Image picker with editing
- Camera capture interface
Android (Material Design)
Navigation:
- Bottom Navigation Bar
- Navigation Drawer (side drawer)
- Top App Bar with scroll behaviors
- Bottom App Bar
- Floating Action Button (FAB) with speed dial
- Navigation Rail (for tablets)
- Tabs with badges
Input:
- Chips (input, filter, choice)
- Sliders with range selection
- Time picker (clock/input)
- Date picker (calendar/input)
- Autocomplete text fields
- Exposed dropdown menu
- Text fields with leading/trailing icons
- Password toggle
- Character counter
Display:
- Cards with multiple action areas
- Lists with avatars, icons, checkboxes
- Expandable lists
- Sticky headers
- Dividers with insets
- Badges on icons
- Snackbars with actions
- Bottom sheets (modal/persistent)
Feedback:
- Material ripple effects
- Circular/linear progress indicators
- Skeleton screens
- Pull to refresh with Material motion
- Swipe to dismiss
- Drag handles
Layout:
- ConstraintLayout concepts
- Motion layout
- Collapsing toolbars
- Parallax scrolling
- Coordinator layouts
Windows (WinUI/Fluent Design)
Navigation:
- NavigationView (hamburger menu + panes)
- Pivot (swipeable tabs)
- TabView with closable tabs
- Breadcrumb navigation
- TreeView with expand/collapse
Input:
- NumberBox with spin buttons
- Rating control (stars)
- ColorPicker with spectrum/palette
- TimePicker/DatePicker with flyouts
- AutoSuggestBox
- ToggleSwitch
- RadioButtons in groups
- ComboBox with search
Display:
- InfoBar (inline notifications)
- TeachingTip (contextual help)
- Expander (collapsible content)
- FlipView (image carousel)
- GridView/ListView with grouping
- SemanticZoom
- ProgressBar/ProgressRing
- CommandBar with overflow
Feedback:
- Flyouts (popovers)
- ContentDialog (modal dialogs)
- ToolTip with rich content
- Notification badges
- Acrylic material (blur effects)
- Reveal highlight (pointer effects)
Advanced:
- InkCanvas (drawing/writing)
- MediaPlayerElement
- WebView2
- Maps control
- Calendar view with date ranges
- Menu with keyboard accelerators
Desktop Applications (VS Code, Xcode, etc.)
Development-Specific:
- Split editors with drag/drop
- Tab groups with split view
- Command palette (fuzzy search)
- File tree with virtual scrolling
- Minimap (code overview)
- Breadcrumbs with dropdown navigation
- Status bar with segments
- Activity bar (vertical icon tabs)
- Panel with tabs (terminal, output, etc.)
- Sidebar with multiple views
- Quick open/quick switch
- Inline parameter hints
- Code lens (contextual info above code)
- Diff viewer (side-by-side/inline)
- Integrated terminal
- Debug controls
- Source control tree
- Extension marketplace UI
- Settings editor (GUI over JSON)
- Keyboard shortcuts editor
- Theme picker with live preview
- Snippet editor
- Task runner UI
Advanced Interaction:
- Multiple cursors
- Column selection
- Go to definition/references
- Peek definition (inline popup)
- Hover tooltips with formatted content
- Context-aware autocomplete
- Inline suggestions (ghost text)
- Scrollbar annotations (errors, search results)
- Folding regions
- Bracket matching
- Indent guides
What We Should Build
Based on this analysis, here are semantic components we should create:
High Priority (Common Across Platforms)
<semantic-stepper>- Numeric increment/decrement<semantic-switch>- Toggle control (better than checkbox for boolean)<semantic-slider>- Range selection with live value<semantic-segment>- Mutually exclusive options (radio group alternative)<semantic-chips>- Multi-select tags/filters<semantic-disclosure>- Expandable/collapsible sections<semantic-sheet>- Bottom sheet/drawer pattern<semantic-popover>- Contextual overlay with arrow<semantic-toast>- Temporary notification<semantic-progress>- Both determinate and indeterminate<semantic-picker>- Generic picker (date/time/options)<semantic-search>- Search with autocomplete/tokens<semantic-toolbar>- Action bar with overflow<semantic-splitview>- Resizable multi-pane layouts<semantic-tabs>- Tab navigation with badges
Medium Priority (Specialized)
<semantic-rating>- Star/heart rating<semantic-badge>- Notification indicators<semantic-avatar>- User/entity representation<semantic-pagination>- Page navigation<semantic-breadcrumb>- Hierarchical navigation<semantic-tree>- Hierarchical data display<semantic-timeline>- Chronological events<semantic-carousel>- Swipeable content<semantic-accordion>- Stacked collapsible sections<semantic-datatable>- Sortable, filterable tables
Low Priority (Advanced)
<semantic-palette>- Command palette with fuzzy search<semantic-canvas>- Drawing/annotation surface<semantic-diff>- Side-by-side comparison<semantic-inspector>- Property editor<semantic-dock>- Dockable panels
Key Principles for Our Implementation
- Modality-agnostic from the start - Every component works with mouse, touch, keyboard, voice
- Adaptive behavior - Components change based on screen size/context automatically
- Semantic intent - Describe what not how (like we did with semantic-action)
- Attention budget aware - Components understand their priority in the visual hierarchy
- Systematic optimization - Grid test every interactive state
- Accessibility built-in - WCAG AAA compliance by default
- Future-proof - Design for AR, VR, and interfaces that don't exist yet
Comparison: What Bootstrap Has vs What We Need
Bootstrap provides:
- Buttons, Forms, Inputs, Checkboxes, Radio buttons
- Dropdowns, Modals, Alerts, Badges
- Navbars, Tabs, Breadcrumbs, Pagination
- Cards, Accordion, Carousel
- Tooltips, Popovers, Toasts
- Progress bars, Spinners
Bootstrap is missing:
- Steppers, Switches, Sliders with live feedback
- Chips/tags with multi-select
- Bottom sheets, Action sheets
- Pull to refresh, Swipe actions
- Split views, Resizable panes
- Command palettes, Quick switchers
- Date/time/color pickers (proper ones)
- Tree views, Timeline views
- Context menus (right-click menus)
- Inline validation with smart positioning
- Skeleton screens, Empty states
- Proper touch gestures (long-press, swipe, pinch)
- Voice integration
- Haptic feedback
- Proper mobile patterns
Our Advantage
By building these as semantic web components with modality-agnostic design:
- They work everywhere (web, mobile web, Electron, PWA, future platforms)
- Single codebase for all devices and input methods
- Automatically adapt to capabilities
- Superior tactile feedback (like our V5 button states)
- Built-in accessibility
- Future-proof architecture
This is the component library that should have existed all along.