PrimeVue UI Component Library

repository·master·Indexed 12 days ago

https://github.com/primefaces/primevue

A comprehensive Vue UI component library featuring a wide range of components, composables, and a dedicated Nuxt module. Version 4.5.5 includes support for Styled and Unstyled modes, a Pass Through (PT) mechanism for DOM customization, design tokens, and an MCP server (@primevue/mcp) for AI assistants like Claude Code, Cursor, and VS Code.

Tokens
539.8K
Snippets
1.2K
Records
1.7K
Agent score
96%

What's inside PrimeVue

  1. What is Unstyled Mode in PrimeVue

    master

    Unstyled mode is an alternative styling approach where PrimeVue excludes the default CSS variables (design tokens) and CSS rule sets. In this mode, the core functionality and accessibility of components are preserved, but no visual styling is provided. This allows developers to implement their own styling solutions (like Tailwind CSS) from scratch.

    Components in unstyled mode can be styled using the Pass Through (pt) mechanism to target specific internal elements like root, label, or icon.

  2. What is the PrimeVue MCP server?

    master

    The PrimeVue Model Context Protocol (MCP) server is an implementation of an open standard that allows AI assistants (like Claude, Cursor, or VS Code) to connect directly to PrimeVue's knowledge base.

    By using this server, your AI assistant gains access to:

    • Component Documentation: Detailed information on props, events, slots, and methods.
    • Theming & Styling: Access to Pass Through (PT) options, design tokens, and CSS class names.
    • Code Examples: Real-world usage patterns and component templates.
    • Accessibility: Information on accessibility features and implementation guides.
  3. What is Volt?

    master

    Volt is a UI library built by PrimeTek that uses unstyled PrimeVue components combined with Tailwind CSS v4.

    Unlike standard PrimeVue components distributed via node_modules, Volt follows a code ownership model where components reside within your application's codebase. This provides complete control over theming and presentation through Tailwind CSS v4 and PrimeVue's templating features.

  4. Accessibility and Keyboard Support for Select

    master

    The Select component is designed with accessibility in mind, utilizing roles like combobox and listbox.

    Accessibility Props

    • aria-labelledby: Links the component to a label element.
    • aria-label: Provides a direct string description for screen readers.
    • filterInputProps: Allows passing aria-* props to the internal filter input element when filtering is enabled.

    Keyboard Navigation

    StateKeyAction
    Closedspace, enter, down arrowOpens the popup and focuses the selected (or first) option
    any printable characterOpens popup and moves focus to option starting with that character
    Popupenter, spaceSelects focused option, closes popup, returns focus to Select
    escapeCloses popup, returns focus to Select
    down arrow / up arrowNavigates through options
    home / endMoves cursor to start/end (if editable) or first/last option
    Filter Inputenter, escapeCloses popup and returns focus to Select
    tabMoves focus to the next focusable element in the popup or the page
  5. Slider Accessibility and Keyboard Support

    master

    The Slider component is designed for accessibility. It uses the slider role on the handle and includes attributes like aria-orientation, aria-valuemin, aria-valuemax, and aria-valuenow.

    Labeling: Use aria-labelledby to link to an existing label ID, or aria-label to provide a direct string label.

    Keyboard Support:

    • Tab: Moves focus to the slider.
    • Left Arrow / Up Arrow: Decrements the value.
    • Right Arrow / Down Arrow: Increments the value.
    • Home: Sets the value to the minimum.
    • End: Sets the value to the maximum.
    • Page Up: Increments the value by 10 steps.
    • Page Down: Decrements the value by 10 steps.
    <span id="label_number">Number</span>
    <Slider aria-labelledby="label_number" />
    
    <Slider aria-label="Number" />
  6. TreeTable Accessibility and Keyboard Support

    master

    The TreeTable uses a treegrid element for screen readers. You can extend its accessibility by passing aria-label, aria-describedby, or other roles via the tableProps option.

    Keyboard Navigation

    KeyFunction
    tabMoves through headers. If focus enters the component, moves to the first selected node (or first element if none selected).
    shift + tabMoves focus to the last selected node or previous element.
    enter / spaceSorts the column or selects the focused treenode.
    down arrowMoves focus to the next treenode.
    up arrowMoves focus to the previous treenode.
    right arrowIf node is closed, opens it; otherwise moves focus to the first child node.
    left arrowIf node is open, closes it; otherwise moves focus to the parent node.
    homeMoves focus to the first same-level node.
    endMoves focus to the last same-level node.
  7. Accessibility of ScrollPanel

    master

    The ScrollPanel component includes built-in accessibility features:

    • Screen Readers: The scrollbar includes a scrollbar role, an aria-controls attribute (referring to the ID of the scrollable content container), and aria-orientation to indicate scrolling direction.
    • Keyboard Support:
      • Tab: Moves focus through the bar.
      • Down Arrow: Scrolls content down (when vertical scrolling is available).
      • Up Arrow: Scrolls content up (when vertical scrolling is available).
      • Left Arrow: Scrolls content left (when horizontal scrolling is available).
      • Right Arrow: Scrolls content right (when horizontal scrolling is available).