Bloc UI

April 17, 2026 · View on GitHub

Lightweight, accessible Angular component library. Barebone structure and behavior with zero design opinions.

CI License: MIT npm @bloc-ui/kit npm @bloc-ui/core

If this saves you time, consider supporting ⭐ Star on GitHub
Documentation & Demos · Getting Started · Star on GitHub

Warning

⚠️ Work in progress - the API may change in breaking ways.


Components

Built on Angular 21. All components are standalone by default with NgModule wrappers available.

ComponentPackageDescription
Button@bloc-ui/corePrimary / secondary / outline variants with loading state
Input@bloc-ui/coreDirective with error detection, groups, prefix/suffix
Checkbox@bloc-ui/coreForms integration and label positioning
Radio@bloc-ui/coreRadio group with roving keyboard navigation
Toggle@bloc-ui/coreSwitch toggle with forms integration
Spinner@bloc-ui/coreInline loading spinner with preset sizes
Badge@bloc-ui/coreLabelling pill with variant and size presets
Progress@bloc-ui/coreHorizontal progress bar with label display
Skeleton@bloc-ui/coreLoading placeholder with line, rect, and circle shapes
Textarea@bloc-ui/coreDirective with error state and forms integration
Modal@bloc-ui/modalProgrammatic modals with typed data injection
Table@bloc-ui/tableDeclarative data table with striped, bordered, hover options
Toast@bloc-ui/toastNotifications with info, success, warning, error types
Tab@bloc-ui/tabTab group with animated active indicator
Date Picker@bloc-ui/date-pickerCalendar dropdown with min/max date support
Tooltip@bloc-ui/tooltipHover/focus tooltip with repositioning and delay control
Alert@bloc-ui/alertInline banner with severity variants and optional dismiss
Accordion@bloc-ui/accordionCollapsible panels with single/multi mode
Autocomplete@bloc-ui/autocompleteSearchable single-select with async-friendly options
Pagination@bloc-ui/paginationPage navigation with sibling/boundary config
Select@bloc-ui/selectDropdown with overlay, keyboard nav, and search
Slider@bloc-ui/sliderRange slider with Angular forms integration
Text Highlight@bloc-ui/text-highlightHighlights matching substrings in text
Virtual Scroll@bloc-ui/virtual-scrollLightweight virtual scrolling for large lists
Layout@bloc-ui/layoutSidebar layout with collapsible panel [EXP⚠️]
Video Player@bloc-ui/video-playerHTML5 video player with native controls [EXP⚠️]

Quick Start

# all-in-one
npm install @bloc-ui/kit
# or pick what you need
npm install @bloc-ui/core @bloc-ui/modal
import { BlocButtonComponent } from '@bloc-ui/core/button';
<button blocButton variant="primary" [loading]="saving">Save</button>

Optional theming - adds light/dark mode, colour tokens, and consistent typography:

npm install @bloc-ui/theme
@use '@bloc-ui/theme/styles/bloc-theme';

Development

Prerequisites: Node 24, npm

npm install          # install dependencies
ng serve             # start demo app → http://localhost:4200
npm run build        # build all libraries
ng test              # run tests

Design Principles

  • Barebone - minimal structural styles, neutral grey fallbacks
  • No hard-coded colours - everything through var() CSS custom properties
  • Cascade-friendly - :where() zero specificity + @layer so your styles always win
  • Accessible - ARIA roles, keyboard navigation, focus management
  • Tree-shakeable - secondary entry points (@bloc-ui/core/button) and standalone packages
  • Forms-ready - ControlValueAccessor on checkbox, toggle, radio, date picker

☕ Ko-fi · ⭐ Star on GitHub · License: MIT