Skip to content

Design System

Technway Component Library

A reusable Stencil.js component library that brings common interface patterns into a consistent, documented system for use across different web projects.
Technway Component Library showing a Storybook component catalog, button states, and a typed API surface

Project Overview

Client
Technway
Project status
Internal Project
Industry
Technology

Services

  • Web Development
  • Web UI/UX Design
  • Web Accessibility

Technologies

  • Next.js
  • React
  • TypeScript
  • Node.js
  • Storybook
  • StencilJS

Common interface patterns often appear across multiple projects, but rebuilding them independently can lead to differences in behavior, accessibility, styling, and implementation.

The goal was to create components that could be reused without making them too specific to one project or frontend framework.

The library also needed clear conventions for component APIs, responsive behavior, interaction states, documentation, and maintenance so that reuse remained predictable as the collection grew.

The Challenge

Common interface patterns often appear across multiple projects, but rebuilding them independently can lead to differences in behavior, accessibility, styling, and implementation.

The goal was to create components that could be reused without making them too specific to one project or frontend framework.

The library also needed clear conventions for component APIs, responsive behavior, interaction states, documentation, and maintenance so that reuse remained predictable as the collection grew.

Goals

Create reusable components for common interface patterns.
Keep component APIs clear, typed, and consistent.
Support use across different web projects and frontend environments.
Include accessibility and responsive behavior as part of component development.
Keep component examples and usage documentation close to the implementation.
Establish a consistent workflow for building, testing, documenting, and releasing changes.

Technway's Role

Component planning and API design.
UI design and reusable interaction patterns.
Stencil and TypeScript development.
Responsive and accessible component implementation.
Storybook documentation and component examples.
Testing, validation, versioning, and release workflows.
Ongoing organization and maintenance of the component library.

Discovery and Approach

  1. The work started by identifying interface patterns that were useful across multiple projects rather than creating components for every possible UI element.
  2. Components were then designed around a focused responsibility and a clear public API. Properties, events, slots, states, and expected behavior were defined so that each component could be understood and integrated without relying on its internal implementation.
  3. Shared conventions were also established for responsive behavior, styling, accessibility, documentation, and component structure.
  4. Storybook was used alongside development so that components could be reviewed independently, including different states and configurations, before being used inside a larger application.

Design and Technical Solution

  • Stencil was chosen as the foundation because it produces standards-based web components while providing TypeScript, component lifecycle APIs, and build tooling for library development.
  • The library uses reusable components with typed properties, events, slots, and methods where needed. Shadow DOM provides component-level encapsulation for structure and styles while still allowing deliberate customization through supported APIs.
  • Components range from foundational controls such as buttons and inputs to larger patterns for navigation, feedback, content, media, and layout.
  • Storybook provides an isolated environment for reviewing components and their states. Generated documentation complements the visual examples by making component APIs and usage easier to understand.
  • The result is a component library that keeps implementation details inside the component while exposing a predictable interface to the projects that use it.

Accessibility

Accessibility is considered at the component level so that common interaction patterns do not need to be solved independently in every project.

Components use semantic elements where appropriate and account for keyboard interaction, focus behavior, labels, validation feedback, touch interaction, and reduced motion where relevant.

Storybook also provides accessibility tooling for reviewing components during development and helps make different states easier to inspect in isolation.

Performance

The library is structured so projects can consume the components they need without recreating the same interface logic and styles locally.

Stencil compiles the source into web components that can be delivered as part of an application build, while component-level exports allow individual components to be consumed when appropriate.

Performance work focuses on keeping component behavior focused, avoiding unnecessary runtime work, and keeping shared UI functionality reusable without introducing application-specific dependencies.

Testing and Quality Assurance

Component development includes automated and visual checks rather than relying only on how a component appears inside one application.

The repository includes Stencil and Jest testing support, Playwright configuration, component validation scripts, and Storybook tooling for interaction and accessibility review.

Continuous integration runs the component test workflow across Windows and Ubuntu before versioning, helping catch environment-specific issues before changes move through the release process.

Storybook remains an important part of quality assurance by making component states, responsive behavior, interactions, and configuration options visible during development and review.

Results and Key Outcomes

  • The project established a shared component library for interface patterns that would otherwise be implemented separately across different projects.
  • The library now provides reusable components for forms, navigation, feedback, content, media, and layout while keeping their behavior and public APIs in one maintained codebase.
  • Centralized Storybook documentation makes it easier to inspect available components, understand their configuration, and review different states without first integrating them into an application.
  • The common component structure also gives Technway a clearer way to improve shared behavior. Changes to accessibility, interaction patterns, responsive behavior, or component APIs can be handled at the library level rather than being solved independently in every implementation.
  • Most importantly, the library provides a practical foundation for reuse without trying to control every aspect of the applications that consume it. Projects remain responsible for their own product experience while common UI patterns can follow the same underlying implementation.

Lessons and Technical Highlights

  • A reusable component should solve a repeated interface need without becoming so configurable that its API becomes difficult to understand.
  • Defining the component contract early makes implementation and future maintenance clearer. Typed properties, events, slots, states, and documented behavior establish what consumers can rely on without exposing internal details.
  • Accessibility and responsive behavior are also more effective when addressed inside shared components. Improvements can then benefit every use of the component rather than depending on each project to implement the same behavior independently.
  • Documentation is part of maintaining a component library. Keeping examples and API information close to the source makes it easier to understand what exists, how it behaves, and how it should be used.
Technway Component Library showing a Storybook component catalog, button states, and a typed API surface

Reusable components with clear APIs

Common UI patterns are implemented as Stencil components with defined properties, events, states, and customization points.

Component inventory and generated API surface

Documentation alongside the components

Storybook keeps examples, component states, usage information, and accessibility review close to the implementation.

Architecture diagram showing Stencil components delivered through React and Next.js packages with a separate layout kit and example applications
Cross-framework package architecture

Built on web components

Stencil keeps the library based on standard custom elements, allowing the same components to be used across different web projects without designing them around one application framework.

Technway Component Library workflow showing component source, documentation, validation, packages, release, and the current automated testing limitation
From component source to documented and versioned packages

Development beyond the component code

Documentation, validation, automated tests, and release workflows are maintained alongside the components so changes can be reviewed and delivered through a consistent process.

CABA clinic appointment platform showing doctor discovery, appointment booking, availability, and administration interfaces

Web Application

CABA

A bilingual web application for managing clinic appointment requests, doctor availability, and role-based access for patients, doctors, and receptionists.

View Case Study
Technway digital platform case study showing bilingual pages, service cards, and the headless content architecture

Headless CMS

Technway Website

A bilingual website built with Next.js and a headless WordPress CMS, combining a custom frontend with structured content management for English and Arabic.

View Case Study