Element Components
Basic UI elements that serve as the foundation for the component library.Button
A versatile button component with multiple style variants and size options.Usage
Props
Button style variant. Options:
primary- Blue background with white textsecondary- Light blue background with blue textghost- Transparent with border and blue texttransparent- No background, inherits text color
Button size. Options:
sm- Small (px-4 py-1 text-sm)normal- Default (px-4 py-2.5)lg- Large (px-4 py-3 text-lg)full- Full width (px-7 py-3 w-full)
Ionicon name to display inside the button (without
-outline suffix)URL for link button. When provided, renders as
<a> instead of <button>Disables the button and applies disabled styling
Style Variants
The component uses computed classes for each type:Source Reference
Location:~/workspace/source/components/elements/Button.vue:1
Text
A semantic typography component that renders different HTML elements based on the content type.Usage
Props
Typography variant. Options:
heading- Uppercase blue heading (renders asp)title- Large heading (renders ash2)subtitle- Medium heading (renders ash3)text- Body text (renders asp)sub- Small supporting text (renders asspan)xs- Extra small text (renders asspan)
Override the default HTML element. When provided, uses this instead of the type’s default tag.
Type Mappings
The component automatically selects the appropriate HTML element:Styling Classes
- heading:
font-bold uppercase text-blue-500 - title:
text-3xl font-bold leading-tight dark:text-white lg:text-4xl - subtitle:
text-xl leading-tight text-gray-700 dark:text-gray-300 lg:text-2xl - text:
text-base leading-loose text-gray-800 dark:text-gray-200 lg:text-lg - sub:
text-sm text-gray-600 dark:text-gray-400 lg:text-base - xs:
text-xs text-gray-600 dark:text-gray-400 lg:text-sm
Source Reference
Location:~/workspace/source/components/elements/Text.vue:1
Icon
A wrapper component for Ionicons with size control.Usage
Props
Ionicon name (e.g., “heart”, “logo-github”, “menu”)
If
true, appends -outline to the icon name for outlined styleIcon size. Options:
sm- text-xs lg:text-smmd- text-sm lg:text-mdlg- text-base lg:text-lgxl- text-lg lg:text-xl2xl- text-xl lg:text-2xl3xl- text-2xl lg:text-3xl4xl- text-3xl lg:text-4xl5xl- text-4xl lg:text-5xl
Size Implementation
Source Reference
Location:~/workspace/source/components/elements/Icon.vue:1
Badge
A label component for displaying tags, categories, or status indicators.Usage
Props
If
true, uses secondary color scheme (light blue background with blue text)Badge size. Options:
sm- !px-2 py-1 !text-smmd- !px-3.5 !py-2.5
Color Variants
Features
- Auto-width: Uses
w-fitto match content width - No-wrap:
whitespace-nowrapprevents text breaking - Dark Mode: Automatic color adaptation
- Font Weight: Bold text for visibility
Source Reference
Location:~/workspace/source/components/elements/Badge.vue:1
Link
A simple wrapper around Vue Router’srouter-link component.
Usage
Props
Route name for Vue Router navigation
Implementation
The component passes theto prop as a named route:
Source Reference
Location:~/workspace/source/components/elements/Link.vue:1
Best Practices
Button
- Use
primaryfor main actions,secondaryfor supporting actions - Use
ghostfor subtle interactions - Include icons for clarity (e.g., download, external links)
- Always disable buttons during async operations
Text
- Use semantic types for proper document structure
- Use
headingfor section labels - Use
titlefor main headings,subtitlefor subheadings - Override selector only when semantic HTML requires it
Icon
- Use outlined icons for consistency (default)
- Use filled icons for logos (
:outline="false") - Choose appropriate sizes for context
Badge
- Use
secondaryvariant for tags and technologies - Use
smsize for dense lists - Group related badges with flex layouts
Link
- Only use for internal Vue Router navigation
- For external links, use standard
<a>tags or Button component withtoprop