Prepared Docs

Prepared Docs

⌘K

    Loading navigation…

User

  1. Working On Features
  2. Ui Components

UI Components

Using @prepared/ui-* packages and the design system.

Quick Reference

UI package hierarchy:

  1. @prepared911/ui-core - Foundational primitives (Button, Input, Modal, Box)
  2. Specialized packages - Domain-specific features (data tables, charts, calendars)
  3. Custom components - Only when design system doesn't cover it

Before implementing:

  • Search the component library for existing components
  • Check Storybook for component APIs and examples
  • Review the design system for available icons and patterns

UI Packages

@prepared911/ui-core

Foundational primitives and general-purpose components:

@prepared911/ui-filters

List filter bars, SortControl, and headless sort/group hooks:

See the Filters design docs. Prefer this package over the temporary Filter re-export from @prepared911/ui-data-table (CORE-555).

@prepared911/ui-data-table

Advanced tables with sorting, filtering, pagination:

Pattern: Column definitions in dedicated hook:

@prepared911/ui-visualization-charts

Chart.js-based components for analytics:

@prepared911/ui-drawer

Sidebars and side panels:

@prepared911/ui-calendar

Date pickers and calendars:

@prepared911/ui-audio-player

Media playback:

Component Discovery

Always check existing components before implementing new UI:

  1. Search component library - Check @prepared911/ui-core and specialized packages
  2. Review Storybook - See component examples and API documentation
  3. Check design tokens - Use CSS custom properties (--spacing-*, --color-*)
  4. Find icons - Check SVGAsset enum in @prepared911/ui-core

Available in @prepared911/ui-core:

  • Layout: Box, FlexBox
  • Interactive: Button, Input, Checkbox, Radio, Select
  • Feedback: Modal, Tooltip, Alert, Spinner
  • Display: Icon, Badge, Avatar, Card

Icon Usage

Composable Icons (Preferred)

Static SVG Assets

Use only when:

  • Icon specific to single component (not reused)
  • Requires custom styling not supported by composable icons
  • Part of larger illustration

Conditional Tooltips

Use disabled prop instead of conditional wrapper:

Tooltips on Disabled Elements

Tooltips work on disabled buttons without any wrapper—Radix Tooltip uses pointer events, which are not blocked by disabled:

When to Use Specialized Packages

Use @prepared911/ui-data-table when:

  • ✅ Displaying tabular data with sorting
  • ✅ Need filtering and pagination
  • ✅ Complex column configurations
  • ✅ Row selection and bulk actions

Use @prepared911/ui-visualization-charts when:

  • ✅ Displaying analytics and metrics
  • ✅ Line charts, bar charts, pie charts
  • ✅ Time-series data visualization

Use @prepared911/ui-core when:

  • ✅ Simple lists or cards (not complex tables)
  • ✅ Foundational UI (buttons, inputs, modals)
  • ✅ Layout primitives (Box, FlexBox)

Design Tokens with Box Props

Box props automatically use design tokens:

Styling Decision Flowchart

Example: Complete Feature

Related Documentation

  • Styling - SCSS and BEM patterns
  • Tokens - Design tokens
  • Component Patterns - Component organization

Reference Files

For more detailed technical guidance, see these reference files:

  • react-ui-implementation SKILL.md
  • mcp-usage SKILL.md

Previous

Working on features / Localization (i18n)

Next

Working on features / Storybook Stories

On this page

Quick Reference
UI Packages
@prepared911/ui-core
@prepared911/ui-filters
@prepared911/ui-data-table
@prepared911/ui-visualization-charts
@prepared911/ui-drawer
@prepared911/ui-calendar
@prepared911/ui-audio-player
Component Discovery
Icon Usage
Composable Icons (Preferred)
Static SVG Assets
Conditional Tooltips
Tooltips on Disabled Elements
When to Use Specialized Packages
Use @prepared911/ui-data-table when:
Use @prepared911/ui-visualization-charts when:
Use @prepared911/ui-core when:
Design Tokens with Box Props
Styling Decision Flowchart
Example: Complete Feature
Related Documentation
Reference Files