- Kolibri Design System - Primary UI components
- Kolibri Core Components - Application-specific shared components
- Kolibri Common Components - Plugin-shared components
Kolibri Design System Components
The Kolibri Design System provides the primary UI component library. Full documentation is available at design-system.learningequality.org.Common Components
KButton
Primary button component with consistent styling and accessibility.- text: Button text (string)
- primary: Primary button styling (boolean, default:
true) - appearance: Button style -
'raised-button','flat-button','basic-link'(string) - disabled: Whether button is disabled (boolean)
- icon: Icon token to display (string)
- iconAfter: Icon token to display after text (string)
- click: Emitted when button is clicked
KModal
Modal dialog component.- title: Modal title (string)
- submitText: Submit button text (string)
- cancelText: Cancel button text (string)
- submitDisabled: Whether submit is disabled (boolean)
- size: Modal size -
'small','medium','large'(string, default:'medium')
- submit: Emitted when submit button clicked
- cancel: Emitted when cancel button clicked or modal is dismissed
- default: Main modal content
- actions: Custom action buttons (replaces submit/cancel)
KTextbox
Text input component with validation support.- value / modelValue: Input value (string)
- label: Input label (string)
- placeholder: Placeholder text (string)
- type: Input type -
'text','password','email', etc. (string) - invalid: Whether input is invalid (boolean)
- invalidText: Error message to display (string)
- disabled: Whether input is disabled (boolean)
- maxlength: Maximum length (number)
- autofocus: Whether to autofocus (boolean)
- input: Emitted on input change
- blur: Emitted on blur
- focus: Emitted on focus
KSelect
Dropdown select component.- value / modelValue: Selected value
- options: Array of
{ label, value }objects (array) - label: Select label (string)
- placeholder: Placeholder text (string)
- disabled: Whether select is disabled (boolean)
- invalid: Whether select is invalid (boolean)
- invalidText: Error message (string)
- change: Emitted when selection changes
KCheckbox
Checkbox input component.- value / modelValue: Checked state (boolean)
- label: Checkbox label (string)
- description: Additional description text (string)
- disabled: Whether checkbox is disabled (boolean)
- change: Emitted when checked state changes
KIcon
Icon component using Material Design icons.- icon: Icon token name (string, required)
- color: Icon color (string)
KCircularLoader
Loading spinner component.- size: Loader size in pixels (number, default: 32)
- delay: Delay before showing in ms (number, default: 0)
KGrid / KGridItem
Responsive grid layout system.- layout12: Layout object for 12-column grid -
{ span, alignment } - layout8: Layout object for 8-column grid
- layout4: Layout object for 4-column grid
- Small screens: 4 columns
- Medium screens: 8 columns
- Large screens: 12 columns
Kolibri Core Components
Core application components located inpackages/kolibri/components/.
CoreTable
Table component for displaying tabular data. Source:packages/kolibri/components/CoreTable.vue
- Responsive design
- Theme-aware styling
- Accessible markup
BottomAppBar
Fixed bottom navigation bar. Source:packages/kolibri/components/BottomAppBar.vue
- default: Content to display in the bar
- Fixed to bottom of viewport
- Responsive sizing
- Theme-aware styling
- Material Design elevation
FilterTextbox
Textbox with filter icon for search/filter functionality. Source:packages/kolibri/components/FilterTextbox.vue
- value / modelValue: Search value (string)
- placeholder: Placeholder text (string)
- input: Emitted on input change
DownloadButton
Button for downloading resources with loading state. Source:packages/kolibri/components/DownloadButton.vue
- files: Array of file objects with
urlandname(array)
- download: Emitted when download completes
AuthMessage
Displays authentication-related messages. Source:packages/kolibri/components/AuthMessage.vue
- header: Message header (string)
- details: Message details (string)
Kolibri Common Components
Shared components used across plugins, located inpackages/kolibri-common/components/.
AccordionContainer / AccordionItem
Accordion/collapsible content sections.- title: Section title (string)
- expanded: Whether initially expanded (boolean)
Using Theme Tokens
All components should use theme tokens for styling instead of hard-coded colors.- $themeTokens.primary: Primary brand color
- $themeTokens.text: Primary text color
- $themeTokens.annotation: Secondary text color
- $themeTokens.surface: Surface background color
- $themeTokens.error: Error state color
- $themeTokens.success: Success state color
Component Development Guidelines
File Structure
- Simple components:
ComponentName.vue - Complex components:
ComponentName/index.vuewith sub-components
Component Conventions
- Use Composition API: All new components should use
setup() - Name matches filename: Component
nameproperty must match file name - Props over state: Keep components stateless when possible
- Internationalize text: Use
createTranslatorfor all user-visible text - Scoped styles: Always use scoped
<style>blocks - Theme tokens: Never hard-code colors
- RTL support: Avoid inline directional styles; use style blocks
Internationalization Example
Best Practices
- Always search first: Check KDS, core, and common components before creating new ones
- Wrap, don’t rewrite: If a component does 80% of what you need, wrap it
- Use KGrid: For layout, use
KGridinstead of flexbox or floats - Responsive composables: Use
useKResponsiveWindowinstead of media queries - Theme-aware: Always use
$themeTokensfor colors - Accessible: Follow WCAG guidelines and use semantic HTML
- Test components: Write unit tests using Vue Testing Library