# SurgeUI > Accessible, themable Vue 3 component library (npm package `@surgeui/vue`, version 4.2.0): components, layouts and composables with WAI-ARIA keyboard and screen reader support, light/dark themes, RTL and translatable texts (French, English, Arabic). - Install `@surgeui/vue` (Vue 3.5+), register the plugin with `app.use(SurgeUI)` and import `@surgeui/vue/style.css` once. For smaller bundles: `createSurgeUI({ components: { Button } })`, or the `@surgeui/vue/resolver` resolver for unplugin-vue-components. - Components are registered globally with the `Su` prefix (``, ``); named imports drop it (`import { Button } from '@surgeui/vue'`). - Form controls use `v-model`. Wrap a control in `` or use a `*Field` component (`SuInputField`, `SuSelectBoxField`…) for label, message and validation state. - Theme with the `--su-*` CSS custom properties and `useTheme()`; do not hard-code colors. - The package was named `@surgeui/ds-vue` up to 3.x; 4.0 removed deprecated APIs (see the migration guide). ## Guide - [Getting Started](https://surgeui.com/en/guide/get-started.md): Modern Vue.js 3 component library with Composition API, designed to create modern and consistent interfaces. - [Installation](https://surgeui.com/en/guide/installation.md): Since 4.0.0, the package is named `@surgeui/vue` (formerly `@surgeui/ds-vue`). See Migrating to 4.0. - [Migrating to 4.0](https://surgeui.com/en/guide/migration.md): Version 4.0.0 publishes the library under a new name, **`@surgeui/vue`**, and removes the APIs deprecated during 3.x. - [AI assistants](https://surgeui.com/en/guide/ai.md): Coding assistants (Claude Code, Cursor, Copilot…) know little about a recent library: they invent props or copy another library's API. SurgeUI gives them its documentation in a form they read direc… - [Nuxt](https://surgeui.com/en/guide/nuxt.md): SurgeUI integrates with Nuxt 3 and 4 through a plugin. A `@surgeui/nuxt` module (auto-imports, CSS, theme without flash) is planned; this guide describes the manual integration. - [RTL (right to left)](https://surgeui.com/en/guide/rtl.md): SurgeUI supports right-to-left languages: Arabic, Hebrew, Persian, Urdu. Components follow the reading direction with no configuration. ## Themes - [Theme System](https://surgeui.com/en/theme/index.md): The Design System provides a comprehensive and performant theme system with support for dark mode, high contrast, and reduced motion. - [Color Guide](https://surgeui.com/en/theme/colors.md): The color system is organized in three hierarchical levels: raw palettes, semantic tokens, and CSS variables. This architecture ensures cohesion, accessibility, and easy maintenance. - [Semantic Tokens](https://surgeui.com/en/theme/tokens.md): Semantic tokens are the heart of the design system. They transform raw colors into meaningful concepts, enabling perfect consistency and simplified maintenance. - [Accessibility](https://surgeui.com/en/theme/accessibility.md): Accessibility is built into the core of the Design System. All components and tokens respect WCAG 2.1 level AA guidelines, with AAA as a goal when possible. - [Complete Examples](https://surgeui.com/en/theme/examples.md): Practical and reusable examples to get started quickly with the Design System. ## Components: display - [Heading](https://surgeui.com/en/components/heading.md): The `Heading` component provides a consistent and flexible way to render typographic titles across the design system. - [Panel](https://surgeui.com/en/components/panel.md): The `Panel` component provides a structured and accessible container to group semantically related content. - [Divider](https://surgeui.com/en/components/divider.md): A horizontal or vertical separator line, with an optional text in the middle ("or", a date). - [Kbd](https://surgeui.com/en/components/kbd.md): A keyboard key or shortcut, to display in text, a tooltip or a menu. - [VisuallyHidden](https://surgeui.com/en/components/visuallyhidden.md): Content read by screen readers but invisible on screen: an icon button label, extra context ("(opens in a new tab)"), a skip link. - [Icon](https://surgeui.com/en/components/icon.md): The Icon component renders vector icons from the HeroIcons library (24px). It supports `outline` and `solid` variants, sizing, colorisation, and adaptive accessibility behaviour depending on whethe… - [Image](https://surgeui.com/en/components/image.md): Image component with aspect ratio support, multiple sources, lazy loading, fallback and complete accessibility. Optimized for performance and responsive compatibility. - [Avatar](https://surgeui.com/en/components/avatar.md): Avatar component based on the Image component to display a profile picture or user initials. Supports notification badges, status indicators and complete accessibility according to W3C standards. - [AvatarGroup](https://surgeui.com/en/components/avatargroup.md): AvatarGroup component to display a series of avatars with overflow management, controlled spacing and before/after slots. Ideal for showing teams, participants or collaborators. - [Badge](https://surgeui.com/en/components/badge.md): Modern and minimalist Badge component for displaying short information, statuses or notifications. Support for icons, dot variants and complete accessibility according to W3C standards. - [Tag](https://surgeui.com/en/components/tag.md): A label for an active filter, a keyword or a selected value. It can have an icon and a remove button. - [Dialog](https://surgeui.com/en/components/dialog.md): Versatile Dialog component for displaying modals (centered) or drawers (side, top/bottom, full screen). It is built on the native `` element opened with `showModal()`: the browser handles t… - [ConfirmDialog](https://surgeui.com/en/components/confirmdialog.md): Confirms an action before running it, with a promise: `await confirm({...})` returns `true` or `false`. Requests are shown by `SuConfirmDialog`, placed once in the application. - [Popover](https://surgeui.com/en/components/popover.md): The Popover component displays contextual content in a floating window that appears above page content. It's ideal for displaying additional information, action menus, forms, or any other contextua… - [Alert](https://surgeui.com/en/components/alert.md): The Alert component shows important, contextual messages to the user: confirmations, warnings, errors or general information. - [Toast](https://surgeui.com/en/components/toast.md): Short-lived notifications: a brief message that confirms an action or reports a problem without interrupting the user. Toasts are created with the `useToast()` composable and rendered by `SuToaster… - [PageHeader](https://surgeui.com/en/components/pageheader.md): Header of an application page: breadcrumb or back link, title, description, badges and actions. The actions move below the title when space runs out, based on the available width rather than the sc… - [Stat](https://surgeui.com/en/components/stat.md): Metric card: label, value, colored change, context, small chart and optional link. Numbers are formatted in the current language. - [Timeline](https://surgeui.com/en/components/timeline.md): Activity feed: dated events with title, author, time, description and icon, grouped by day ("Today", "Yesterday", then the full date). - [CodeBlock](https://surgeui.com/en/components/codeblock.md): Captioned code block, with a copy button and optional line numbers. It ships no syntax highlighting: plug in the one you prefer (Shiki, Prism) through the default slot. - [Prose](https://surgeui.com/en/components/prose.md): Typography for written content: article, help page, rendered Markdown or CMS content. Headings, paragraphs, lists, quotes, code, tables and images take the theme colors and spacing. - [Tooltip](https://surgeui.com/en/components/tooltip.md): A short description of an element, shown on hover and keyboard focus. It is linked to its trigger with `aria-describedby`, can be hovered, and closes with Escape. - [DataTable](https://surgeui.com/en/components/datatable.md): A data table with sorting, row selection, pagination, loading and empty states, built on an accessible native ``. - [TreeView](https://surgeui.com/en/components/treeview.md): A tree: files, categories, org charts. Items expand, can be browsed with the keyboard and can be selected. - [Tabs](https://surgeui.com/en/components/tabs.md): The **Tabs** component organizes content into sections shown one at a time. It covers three uses: - [Accordion](https://surgeui.com/en/components/accordion.md): The `Accordion` component allows you to display multiple collapsible content sections. Each section is managed by an `AccordionItem` sub-component, which contains a Heading. - [Collapse](https://surgeui.com/en/components/collapse.md): The Collapse component displays content in collapsible sections. Each section can be independently opened or closed. It supports full keyboard navigation, custom slots for headers and panels, and a… - [Progress](https://surgeui.com/en/components/progress.md): Flexible progress component supporting determinate and indeterminate states, customizable labels, and value formatting through a `formatValue` prop. - [Spinner](https://surgeui.com/en/components/spinner.md): A modern and accessible spinner component for displaying loading states in your Vue.js applications. This component offers multiple design variants and follows accessibility best practices. - [Skeleton](https://surgeui.com/en/components/skeleton.md): A placeholder for content that is loading: text lines, a circle (avatar) or a rectangle (image, card). It reserves the content's space and prevents layout shifts. - [EmptyState](https://surgeui.com/en/components/emptystate.md): An empty area: a list with no results, the first use of a feature, a loading error. It explains the situation and offers the next action. - [Price](https://surgeui.com/en/components/price.md): Price display component with multi-currency support, promotional variants, and accessible formatting. Uses the `usePrice` composable based on `Intl.NumberFormat`. - [Card](https://surgeui.com/en/components/card.md): Universal, flexible, and responsive card component. Supports images, titles, content, actions, links, and multiple visual variants. Suitable for many use cases: product, blog post, profile, stats,… ## Components: actions - [Button](https://surgeui.com/en/components/button.md): Flexible button component with multiple variants, sizes and states. Supports keyboard interactions and loading states. - [ButtonGroup](https://surgeui.com/en/components/buttongroup.md): ButtonGroup component for organizing and aligning buttons with controlled spacing. Supports propagation of `size` and `variant` props to child buttons and special border handling for connected butt… - [Link](https://surgeui.com/en/components/link.md): Flexible Link component for internal and external links with icon support, variants, and full accessibility. Compatible with Vue Router and native HTML links. - [LinkGroup](https://surgeui.com/en/components/linkgroup.md): LinkGroup component for organizing and aligning links with controlled spacing. Supports propagation of `size`, `variant` and `underline` props to child links and special border handling for connect… - [Toggle](https://surgeui.com/en/components/toggle.md): A toggleable button with two states (on/off). Accepts a text label or icon, with full accessibility via `role="switch"` and `aria-checked`. - [ToggleGroup](https://surgeui.com/en/components/togglegroup.md): A group of toggles with exclusive or multi-selection. Supports connected mode, vertical/horizontal orientation, and ARIA roles adapted to the selection mode. - [FloatButton](https://surgeui.com/en/components/floatbutton.md): FloatButton component for placing a floating button in the screen corner with support for slots, badges, tooltips and complete accessibility according to W3C standards. - [Dropdown](https://surgeui.com/en/components/dropdown.md): Dropdown component that looks like a button but displays a list of options when clicked. Each option can be a link (if it contains an href) or trigger an action. Compliant with W3C accessibility st… - [Breadcrumb](https://surgeui.com/en/components/breadcrumb.md): Shows where the page sits in the site hierarchy and lets users go back up a level. The last item is the current page. - [Pagination](https://surgeui.com/en/components/pagination.md): Navigation between the pages of a list or a table. The number of buttons stays constant (ellipses replace distant pages), so the bar keeps the same width from one page to the next. - [Stepper](https://surgeui.com/en/components/stepper.md): Progress through a multi-step flow (checkout, sign-up, setup wizard). - [CommandPalette](https://surgeui.com/en/components/commandpalette.md): Search and run commands with the keyboard, opened with `Ctrl` + `K` (`⌘` + `K` on Mac): navigation, actions, preferences. - [NavMenu](https://surgeui.com/en/components/navmenu.md): Side navigation of an application: titled groups, icons, counters, one level of expandable sub-items, active item from the route, icons-only collapsed mode. Put it in the sidebar of AppShell. - [ThemeToggle](https://surgeui.com/en/components/themetoggle.md): Switches between light and dark modes, or picks light, dark or system. The component drives useTheme: the state is shared by the whole application and saved in the browser when `persist` is on. - [SkipLink](https://surgeui.com/en/components/skiplink.md): Skip link: the first element reached with the keyboard, it leads straight to the main content without going through the header and the navigation again (WCAG 2.4.1). It stays hidden until it gets k… - [CopyButton](https://surgeui.com/en/components/copybutton.md): Copies text to the clipboard. The label switches to "Copied" for a few seconds and the result is announced to screen readers. ## Components: forms - [Input](https://surgeui.com/en/components/input.md): Flexible input component with complete HTML type support, prefixes/suffixes, text alignment, RTL/LTR direction and accessibility according to W3C standards. - [Textarea](https://surgeui.com/en/components/textarea.md): Flexible **Textarea** component with character counter, automatic height adjustment and W3C accessibility standards compliance. - [NumberInput](https://surgeui.com/en/components/numberinput.md): A numeric field: input in the language's format ("1,234.5" in English), − / + buttons, bounds, step and display format (currency, unit, percent). - [Autocomplete](https://surgeui.com/en/components/autocomplete.md): A free-text field with suggestions: the input stays free, picking a suggestion replaces it. Suggestions can be filtered locally or come from a server. - [DatePicker](https://surgeui.com/en/components/datepicker.md): A date field: type the date in the language's format ("mm/dd/yyyy" in US English) or pick it in a calendar. - [Calendar](https://surgeui.com/en/components/calendar.md): A month grid to pick a day, usable on its own or inside a DatePicker. The first day of the week and the names follow the language. - [SuSelectBox](https://surgeui.com/en/components/selectbox.md): Custom SelectBox component with multiple selection support, integrated search, option groups and complete accessibility according to W3C standards. - [RadioGroup](https://surgeui.com/en/components/radio-group.md): RadioGroup component for single selection with two display styles: classic or cards. Complete accessibility support according to W3C standards. - [Checkbox](https://surgeui.com/en/components/checkbox.md): A single checkbox built on a native ``. It supports a label, a description and a mixed state for "select all" checkboxes, and links itself to a parent `SuFormField`. - [CheckboxGroup](https://surgeui.com/en/components/checkbox-group.md): CheckboxGroup component for multiple selection with two display styles: classic or cards. Complete accessibility support according to W3C standards. - [Switch](https://surgeui.com/en/components/switch.md): Switch (toggle) component for on/off actions. W3C compliant with complete accessibility support and intelligent label positioning. - [Slider](https://surgeui.com/en/components/slider.md): Slider component for selecting numeric values with automatic dual-range support, vertical/horizontal orientation, tooltips, custom marks, and full W3C accessibility compliance. - [Password](https://surgeui.com/en/components/password.md): Password component that inherits from the Input component with complexity validation, strength progress bar and visibility toggle. Compliant with W3C accessibility standards with voice feedback for… - [OtpInput](https://surgeui.com/en/components/otpinput.md): OTP (One-Time Password) input component for verification codes. Supports multiple visual variants, configurable grouping, flexible validation, and auto-submit. WCAG compliant with full keyboard and… - [Rating](https://surgeui.com/en/components/rating.md): Star rating: keyboard and pointer input, or read-only display (decimal values allowed). - [SuFormField](https://surgeui.com/en/components/formfield.md): Container component for form fields with label, help messages, validation states management and accessibility according to W3C standards. - [FormFieldGroup](https://surgeui.com/en/components/formfieldgroup.md): FormFieldGroup component for organizing and aligning form fields with controlled spacing. Supports propagation of the `size` prop to child fields and section management with `head` and `footer` slots. ## Layouts - [Layouts](https://surgeui.com/en/components/layouts.md): Layouts (the *templates* layer of Atomic Design) structure a page or a section: they place areas, exposed as **slots**, and draw nothing else. Colors, cards and typography belong to the components… - [SingleColumnLayout](https://surgeui.com/en/components/singlecolumnlayout.md): A single centered column with a comfortable line length: articles, blogs, forms, mobile pages. On mobile the column spans the full width with side gutters; beyond that it centers and stops at its m… - [SidebarLayout](https://surgeui.com/en/components/sidebarlayout.md): Two columns: a fixed-width sidebar and fluid content. For docs, dashboards and admin pages. Below the breakpoint, areas are stacked in DOM order. - [SplitLayout](https://surgeui.com/en/components/splitlayout.md): Two areas side by side: split screen (image + pitch, A vs B comparison) or an asymmetrical composition with `ratio`. Areas are stacked below the breakpoint. - [HolyGrailLayout](https://surgeui.com/en/components/holygraillayout.md): Application layout: header, navigation, main content, complementary column and footer. Semantic landmarks and a skip link are built in. - [MagazineLayout](https://surgeui.com/en/components/magazinelayout.md): Editorial hierarchy for news sites and blogs: a featured story, a column of secondary headlines, then a story grid. The grid also works for product lists and galleries. - [GridLayout](https://surgeui.com/en/components/gridlayout.md): A grid of equally important cells: product lists, galleries, dashboards. Cells read row by row. The number of columns follows the container width, or adapts on its own from a minimum cell width. A… - [MasonryLayout](https://surgeui.com/en/components/masonrylayout.md): A wall of mixed-height items (galleries, media feeds, testimonials) stacked in columns, with no gaps. Each item keeps its height and is never split across two columns. - [HeroLayout](https://surgeui.com/en/components/herolayout.md): Landing page for product launches and signups: a hero (eyebrow, title, description, calls to action, media), followed by the page sections. The title has a fluid size that follows the container width. - [FullScreenLayout](https://surgeui.com/en/components/fullscreenlayout.md): Full-screen storytelling, one idea per screen: product tours, annual reports, onboarding. Each direct child takes the height of the area and scrolling snaps to each one. - [AppShell](https://surgeui.com/en/components/appshell.md): Shell of an application: sidebar, top bar, main content, footer and skip link. On large screens, the sidebar is fixed and can collapse to icons; below the breakpoint, it opens in a drawer from the… ## Composables - [useTheme](https://surgeui.com/en/composables/usetheme.md): Composable for theme management, light/dark mode switching, contrast, and motion preferences. Persists user preferences in `localStorage`. - [useCustomTheme](https://surgeui.com/en/composables/usecustomtheme.md): Composable for injecting custom CSS variables at runtime. Override design system tokens for a specific component or section. - [useBreakpoint](https://surgeui.com/en/composables/usebreakpoint.md): Composable for reactive breakpoint detection. Uses `window.matchMedia` for performant detection without listening to the `resize` event. SSR compatible. - [usePrice](https://surgeui.com/en/composables/useprice.md): Composable for reactive price and currency formatting. Based on `Intl.NumberFormat` for locale-aware formatting. Exposes individual price parts for flexible rendering. - [useFloatingPosition](https://surgeui.com/en/composables/usefloatingposition.md): Composable that positions floating elements (popover, menu, dropdown list) against their reference element. It is built on Floating UI and powers `SuPopover`, `SuDropdown` and `SuSelectBox`. - [useLocale](https://surgeui.com/en/composables/uselocale.md): Language of the components' default texts: accessible labels ("Clear selection", "Close"…), placeholders, error messages and screen reader announcements. French is the default locale; English and A… - [useFormField](https://surgeui.com/en/composables/useformfield.md): Links a control to the surrounding SuFormField: id (label target), label, help message and field states. SurgeUI controls already use it; this composable is for your own controls. - [useAnnouncer](https://surgeui.com/en/composables/useannouncer.md): Announces a message to screen readers without displaying it: the outcome of an action, a result count, an error. SurgeUI components use it for their announcements (multiple selection, files added,… - [useFocusTrap](https://surgeui.com/en/composables/usefocustrap.md): Keeps tabbing inside a container (side panel, modal popover, mobile menu) and returns focus to the original element on close. The Popover uses it in modal mode. - [useDismiss](https://surgeui.com/en/composables/usedismiss.md): Closes a layered element (popover, menu, dropdown list, panel) with Escape, a pointer down outside or focus loss. Popover, Dropdown and SelectBox use it. - [useListNavigation](https://surgeui.com/en/composables/uselistnavigation.md): Keyboard navigation in a list: arrows, Home / End and typeahead, skipping disabled items. SelectBox, Dropdown, Tabs and Accordion use it: the keyboard behaves the same everywhere. - [useClipboard](https://surgeui.com/en/composables/useclipboard.md): Copies text to the clipboard and exposes a temporary "copied" state. CopyButton and CodeBlock use it. ## Other pages - [Components](https://surgeui.com/en/components/index.md): The SurgeUI Design System provides a Vue 3 component library organized using **Atomic Design** principles. Every component is accessible, themeable, and designed to work with all 5 built-in themes… - [FileUpload](https://surgeui.com/en/components/Fileupload.md): FileUpload component for file uploading with drag & drop support, format and size validation, and complete W3C accessibility compliance. - [Action Components](https://surgeui.com/en/components/actions.md): Action components enable user interaction: buttons, links, toggles, dropdown menus, and more. - [CheckboxGroup](https://surgeui.com/en/components/checkboxgroupfield.md): CheckboxGroup component for multiple selection with two display styles: classic or cards. Complete accessibility support according to W3C standards. - [Display Components](https://surgeui.com/en/components/display.md): Display components present visual content: headings, images, badges, modals, progress indicators, and more. - [FileUploadField](https://surgeui.com/en/components/fileuploadfield.md): FileUploadField component for file uploading with drag & drop support, format and size validation, and complete accessibility according to W3C standards. - [Form Components](https://surgeui.com/en/components/form.md): Form components handle data input and validation: text fields, selectors, switches, file uploads, and more. - [InputField](https://surgeui.com/en/components/inputfield.md): Flexible InputField component with complete HTML type support, prefixes/suffixes, text alignment, RTL/LTR direction and accessibility according to W3C standards. - [SuRadioGroup](https://surgeui.com/en/components/radiogroupfield.md): SuRadioGroup component for single selection with two display styles: classic or cards. Complete accessibility support according to W3C standards. - [RangeField](https://surgeui.com/en/components/rangefield.md): Range/Slider Field component for selecting numeric values with support for dual-range, vertical/horizontal orientation, ticks and complete accessibility according to W3C standards. - [SelectBoxField](https://surgeui.com/en/components/selectboxfield.md): Custom SelectBox component with support for multiple selection, integrated search, option groups and complete accessibility according to W3C standards. - [SliderField](https://surgeui.com/en/components/sliderfield.md): SliderField component for selecting numeric values with automatic dual-range support, vertical/horizontal orientation, tooltips, custom marks and complete accessibility according to W3C standards. - [SwitchField](https://surgeui.com/en/components/switchfield.md): SwitchField component for on/off toggle actions. Compliant with W3C standards with complete accessibility support and intelligent label positioning. - [Textarea](https://surgeui.com/en/components/textareafield.md): Flexible Textarea component with character counter, automatic height adjustment and compliance with W3C accessibility standards. ## Optional - [Full documentation in one file](https://surgeui.com/llms-full.txt) - [API manifest (JSON): props, events, slots and exposed methods of every component, extracted from the types](https://surgeui.com/api.json) - [Documentation en français](https://surgeui.com/llms-fr.txt) - [Usage guide shipped with the npm package (AGENTS.md)](https://github.com/mahmoud-nb/surge.ui/blob/main/package/vue/AGENTS.md)