Skip to content

nexa-ui-kit

A premium, modern, accessible component library built natively on the Nexa reactivity and VDOM engine. It features glassmorphism, responsive designs, custom form controls, data layers, and gesture support.


Forms & Inputs

NInput

General purpose text input with clearable options, status states, and sizing.

Props

PropTypeDefaultDescription
modelValuestring''Input value
typestring'text'Input type (text, email, password)
labelstring''Floating input label
placeholderstring''Input placeholder
disabledbooleanfalseDisables interaction
readonlybooleanfalseSets input to read-only
errorstring''Display validation error message
clearablebooleanfalseShows clear button when input has value
maxlengthnumberundefinedMaximum character length

Emits

EventParametersDescription
update:modelValuevalue: stringTriggered when value changes
clearnoneTriggered when clear button is clicked

Example

html
<script setup>
import { signal } from 'nexa-framework'
import { NInput } from 'nexa-ui-kit'

const username = signal('')
</script>

<template>
  <NInput
    v-model="username"
    label="Username"
    placeholder="Enter username"
    clearable
  />
</template>

NPassword

High-security password field with built-in strength meter and criteria checklist.

Props

PropTypeDefaultDescription
modelValuestring''Password value
labelstring'Password'Floating input label
placeholderstring''Input placeholder
disabledbooleanfalseDisables interaction
readonlybooleanfalseSets input to read-only
clearablebooleanfalseShows clear button
toggleMaskbooleantrueAllows toggling password visibility
showStrengthbooleantrueDisplays password strength meter
validatebooleantrueActivates criteria validation checklist
showRequirementsbooleantrueRenders criteria checklist
minLengthnumber8Minimum required password length
requireLowerbooleantrueRequires at least one lowercase character
requireUpperbooleantrueRequires at least one uppercase character
requireNumberbooleantrueRequires at least one number
requireSpecialbooleantrueRequires at least one special character

Emits

EventParametersDescription
update:modelValuevalue: stringTriggered when value changes

Example

html
<script setup>
import { signal } from 'nexa-framework'
import { NPassword } from 'nexa-ui-kit'

const pwd = signal('')
</script>

<template>
  <NPassword
    v-model="pwd"
    :minLength="10"
    :showStrength="true"
    :showRequirements="true"
  />
</template>

NAutocomplete

Asynchronous select with suggestion filtering, keyboard navigation, and debouncing.

Props

PropTypeDefaultDescription
modelValueanynullSelected option
suggestionsany[][]Active list of options to search through
labelstring''Input label
placeholderstring''Input placeholder
disabledbooleanfalseDisables interaction
loadingbooleanfalseShows loading spinner

Emits

EventParametersDescription
update:modelValuevalue: anyTriggered when suggestion is selected
completequery: stringTriggered when user types (debounced)

Example

html
<script setup>
import { signal } from 'nexa-framework'
import { NAutocomplete } from 'nexa-ui-kit'

const selectedCity = signal(null)
const cities = signal([])

const handleSearch = (query) => {
  cities.value = ['Madrid', 'Barcelona', 'Valencia'].filter(c => c.toLowerCase().includes(query.toLowerCase()))
}
</script>

<template>
  <NAutocomplete
    v-model="selectedCity"
    :suggestions="cities.value"
    label="City"
    @complete="handleSearch"
  />
</template>

NSelect

Custom premium dropdown with filterable options, smooth selections, and clearable options.

Props

PropTypeDefaultDescription
modelValueanynullCurrent selected option value
optionsany[][]Array of options ({ label, value } or strings)
labelstring''Dropdown label
placeholderstring'Select option'Dropdown placeholder
disabledbooleanfalseDisables select
clearablebooleanfalseAllows clearing selection
filterablebooleanfalseAllows search filtering in list

Emits

EventParametersDescription
update:modelValuevalue: anyTriggered when selected option changes

Example

html
<script setup>
import { signal } from 'nexa-framework'
import { NSelect } from 'nexa-ui-kit'

const selected = signal('option1')
const options = [
  { label: 'Option 1', value: 'option1' },
  { label: 'Option 2', value: 'option2' }
]
</script>

<template>
  <NSelect
    v-model="selected"
    :options="options"
    label="Choose option"
  />
</template>

NMultiSelect

Advanced multi-select pill selector supporting filtering, tag displays, and checkmarks.

Props

PropTypeDefaultDescription
modelValueany[][]Selected options array
optionsany[][]Available options ({ label, value })
labelstring''Field label
placeholderstring'Select options'Field placeholder
disabledbooleanfalseDisables component
maxSelectedLabelsnumber3Maximum count displayed before collapsing to "+X Selected"

Emits

EventParametersDescription
update:modelValuevalue: any[]Triggered on item selection toggle

Example

html
<script setup>
import { signal } from 'nexa-framework'
import { NMultiSelect } from 'nexa-ui-kit'

const selectedOptions = signal([])
const options = [
  { label: 'Vue', value: 'vue' },
  { label: 'Nexa', value: 'nexa' },
  { label: 'React', value: 'react' }
]
</script>

<template>
  <NMultiSelect
    v-model="selectedOptions"
    :options="options"
    label="Select technologies"
  />
</template>

NInputNumber

Formatted numeric input supporting increments, decrements, constraints, and localized currencies.

Props

PropTypeDefaultDescription
modelValuenumbernullNumeric value
minnumberundefinedMinimum allowed value
maxnumberundefinedMaximum allowed value
stepnumber1Numeric step incremental scale
modestring'decimal'Format mode (decimal, currency)
currencystring'USD'Active currency type ISO code
localestring'en-US'Active localization locale format
prefixstring''Decorative input prefix
suffixstring''Decorative input suffix

Emits

EventParametersDescription
update:modelValuevalue: numberTriggered on numeric adjustment

Example

html
<script setup>
import { signal } from 'nexa-framework'
import { NInputNumber } from 'nexa-ui-kit'

const price = signal(100)
</script>

<template>
  <NInputNumber
    v-model="price"
    mode="currency"
    currency="USD"
    label="Price"
  />
</template>

NCheckbox

Custom reactive checkbox toggle with customizable label slots.

Props

PropTypeDefaultDescription
modelValueanyfalseBinding target state
labelstring''Checkbox display label
disabledbooleanfalseDisables interaction
checkedValueanytrueValue matching checked state
uncheckedValueanyfalseValue matching unchecked state

Emits

EventParametersDescription
update:modelValuevalue: anyTriggered when state is toggled

Example

html
<script setup>
import { signal } from 'nexa-framework'
import { NCheckbox } from 'nexa-ui-kit'

const accepted = signal(false)
</script>

<template>
  <NCheckbox
    v-model="accepted"
    label="Accept terms and conditions"
  />
</template>

NRadio

Group-aware custom radio choice item.

Props

PropTypeDefaultDescription
modelValueanynullBinding target group value
valueanynullChoice value
labelstring''Radio display label
namestring''Form name group
disabledbooleanfalseDisables choice selection

Emits

EventParametersDescription
update:modelValuevalue: anyTriggered on checked change

Example

html
<script setup>
import { signal } from 'nexa-framework'
import { NRadio } from 'nexa-ui-kit'

const selectedGender = signal('female')
</script>

<template>
  <div class="flex gap-4">
    <NRadio v-model="selectedGender" value="male" label="Male" name="gender" />
    <NRadio v-model="selectedGender" value="female" label="Female" name="gender" />
  </div>
</template>

NSwitch

A premium iOS-style switch toggle.

Props

PropTypeDefaultDescription
modelValuebooleanfalseBinding state
labelstring''Toggle display label
disabledbooleanfalseDisables switch

Emits

EventParametersDescription
update:modelValuevalue: booleanTriggered when toggled

Example

html
<script setup>
import { signal } from 'nexa-framework'
import { NSwitch } from 'nexa-ui-kit'

const isNotificationsEnabled = signal(true)
</script>

<template>
  <NSwitch
    v-model="isNotificationsEnabled"
    label="Enable Notifications"
  />
</template>

NChips

A fluid tags builder enabling interactive dynamic list tags management.

Props

PropTypeDefaultDescription
modelValuestring[][]Active list array
labelstring''Builder label
placeholderstring''Placeholder instructions
disabledbooleanfalseDisables modifications
maxnumberundefinedMaximum count allowed

Emits

EventParametersDescription
update:modelValuevalue: string[]Triggered on chip add or remove

Example

html
<script setup>
import { signal } from 'nexa-framework'
import { NChips } from 'nexa-ui-kit'

const tags = signal(['design', 'code'])
</script>

<template>
  <NChips
    v-model="tags"
    label="Tags"
    placeholder="Press enter to add tag"
  />
</template>

NDatepicker

Calendar picker component integrating Teleport container and automated smart viewport positioning.

Props

PropTypeDefaultDescription
modelValuestring''Date string (YYYY-MM-DD)
labelstring''Date picker label
placeholderstring''Placeholder text
formatstring'YYYY-MM-DD'Output date format
disabledbooleanfalseDisables interactions
minDatestring''Minimum allowed selectable date
maxDatestring''Maximum allowed selectable date

Emits

EventParametersDescription
update:modelValuevalue: stringTriggered on date select

Example

html
<script setup>
import { signal } from 'nexa-framework'
import { NDatepicker } from 'nexa-ui-kit'

const birthday = signal('1995-12-17')
</script>

<template>
  <NDatepicker
    v-model="birthday"
    label="Select Birthday"
  />
</template>

Buttons & Layout

NButton

Premium, highly configurable action button with loading states, sizes, and ripple effects.

Props

PropTypeDefaultDescription
variantstring'primary'Style theme (primary, secondary, success, warning, info, danger, ghost, outline, glass)
sizestring'md'Sizing scale (sm, md, lg)
typestring'button'Underlying button element type
disabledbooleanfalseDisables click interactions
loadingbooleanfalseShows animated loading icon
blockbooleanfalseExpands to full container width
roundedbooleanfalseApplies pill-style rounded shape
loadingTextstring''Loading label state text

Emits

EventParametersDescription
clickevent: MouseEventTriggered on click when not active loading or disabled

Example

html
<script setup>
import { NButton } from 'nexa-ui-kit'
</script>

<template>
  <NButton variant="primary" size="md">Submit Form</NButton>
</template>

NCard

Premium structure containers providing border options, hover effects, header and footer structures.

Props

PropTypeDefaultDescription
titlestring''Card title
subtitlestring''Card subtitle
borderedbooleantrueDisplays card borders
shadowbooleantrueDisplays modern depth shadows
hoverablebooleanfalseEnhances lift transform animations on hover

Slots

NameDescription
headerReplaces title block structure
defaultRenders main body content
footerBottom footer content

Example

html
<script setup>
import { NCard, NButton } from 'nexa-ui-kit'
</script>

<template>
  <NCard title="Developer Profile" subtitle="Nexa Core Developer">
    <p>Building local-first reactive applications.</p>
    <template #footer>
      <NButton size="sm">View Details</NButton>
    </template>
  </NCard>
</template>

NModal

Responsive modal overlay dialog featuring animated background blurs and accessibility controls.

Props

PropTypeDefaultDescription
modelValuebooleanfalseModal display state
titlestring''Header title
sizestring'md'Width sizing (sm, md, lg, xl, full)
closablebooleantrueShows top close button
closeOnOverlaybooleantrueAllows click on outer backdrop to dismiss

Emits

EventParametersDescription
update:modelValuevalue: booleanTriggered on dismissal

Slots

SlotDescription
headerModal header
defaultMain content
footerModal footer action buttons

Example

html
<script setup>
import { signal } from 'nexa-framework'
import { NModal, NButton } from 'nexa-ui-kit'

const showModal = signal(false)
</script>

<template>
  <NButton @click="showModal.value = true">Open Dialog</NButton>
  <NModal v-model="showModal" title="Security Warning">
    <p>Are you sure you want to delete this resource?</p>
    <template #footer>
      <NButton variant="ghost" @click="showModal.value = false">Cancel</NButton>
      <NButton variant="danger">Confirm</NButton>
    </template>
  </NModal>
</template>

NBottomSheet

Mobile drawer modal drawer sheet sliding from bottom with swipe velocity detection closures.

Props

PropTypeDefaultDescription
modelValuebooleanfalseBottom drawer status
titlestring''Header title
heightstring'50vh'Target height
dragToClosebooleantrueAllows dragging downwards to close
snapPointsnumber[][]Fractional vertical snapping heights

Emits

EventParametersDescription
update:modelValuevalue: booleanTriggered on sheet closure

Example

html
<script setup>
import { signal } from 'nexa-framework'
import { NBottomSheet, NButton } from 'nexa-ui-kit'

const showDrawer = signal(false)
</script>

<template>
  <NButton @click="showDrawer.value = true">Open Bottom Menu</NButton>
  <NBottomSheet v-model="showDrawer" title="Actions Menu">
    <div class="p-4 flex flex-col gap-2">
      <button class="menu-item">Share Contact</button>
      <button class="menu-item">Edit Profile</button>
    </div>
  </NBottomSheet>
</template>

NTabs

Organized tab selector providing tab panel slot structures and selection tracking.

Props

PropTypeDefaultDescription
modelValuestring''Selected active tab ID
itemsany[][]Tab structures ({ id, label, icon })
positionstring'top'Tab bar location (top, bottom)

Emits

EventParametersDescription
update:modelValuevalue: stringTriggered on tab change

Example

html
<script setup>
import { signal } from 'nexa-framework'
import { NTabs } from 'nexa-ui-kit'

const activeTab = signal('tab1')
const tabItems = [
  { id: 'tab1', label: 'Home' },
  { id: 'tab2', label: 'Settings' }
]
</script>

<template>
  <NTabs v-model="activeTab" :items="tabItems" />
  <div v-if="activeTab.value === 'tab1'">Home view content</div>
  <div v-if="activeTab.value === 'tab2'">Settings panel view</div>
</template>

Data Display

NDataTable

Premium tables with asynchronous loading overlays, pagination, selection options, and sorting.

Props

PropTypeDefaultDescription
columnsany[][]Column configurations. See Column Customization below.
dataany[][]Rows database array
loadingbooleanfalseRenders dynamic glass loading block overlay
paginatorbooleanfalseRenders interactive NPaginator pagination
rowsnumber10Rows limit per page
selectionModestringnullSelection scheme (single, multiple)
selectionanynullBound selected row choices
sortFieldstring''Sorted database field key
sortOrdernumber1Sorting direction (1 ASC, -1 DESC)

Column Customization

Unlike PrimeVue which uses template scoped slots (<template #body="slotProps">), Nexa uses JS/TS render functions (body and headerTemplate) inside the column configuration objects in <script setup>. This is because Nexa compiles template slots to static VNode arrays rather than functions.

Using body with h() achieves the exact same results with native JS flexibility and reactivity.

Column Configuration Properties
PropertyTypeDescription
fieldstringThe data field key to display
headerstringThe header label to show
sortablebooleanWhether this column can be sorted
typestringThe column data type ('text', 'number', 'boolean')
align'left' | 'right' | 'center'Horizontal alignment of cell contents
widthstringColumn width (e.g. '120px')
body(row: any, context: { index: number, column: any, field: string, value: any }) => anyCustom cell renderer function returning a VNode or string
headerTemplate(col: any) => anyCustom header renderer function returning a VNode or string
Basic Example (Status Badge)

To render simple dynamic status tags using UI components:

html
<script setup>
import { signal, h } from 'nexa-framework'
import { NDataTable, NBadge } from 'nexa-ui-kit'

const columns = [
  { field: 'name', header: 'Name' },
  { 
    field: 'status', 
    header: 'Status',
    body: (row) => h(NBadge, {
      variant: row.status === 'active' ? 'success' : 'danger'
    }, [row.status.toUpperCase()])
  }
]

const items = signal([
  { id: 1, name: 'Alice Smith', status: 'active' },
  { id: 2, name: 'Bob Jones', status: 'inactive' }
])
</script>

<template>
  <NDataTable :columns="columns" :data="items.value" />
</template>
Complex Example (Product Layout + Formatters + Interactive Buttons)

You can build complex nested layouts, call helper utilities, display images, and attach event listeners (with stopPropagation) to custom actions:

html
<script setup>
import { signal, h } from 'nexa-framework'
import { NDataTable, NButton } from 'nexa-ui-kit'

const formatCurrency = (val) => {
  return new Intl.NumberFormat('en-US', { style: 'currency', currency: 'USD' }).format(val)
}

const editProduct = (prod) => {
  console.log('Edit', prod.id)
}

const deleteProduct = (prod) => {
  console.log('Delete', prod.id)
}

const columns = [
  {
    field: 'product',
    header: 'Product Detail',
    width: '300px',
    body: (row) => h('div', { class: 'flex items-center gap-3' }, [
      h('img', { 
        src: row.image, 
        alt: row.name, 
        class: 'w-12 h-12 rounded-lg object-cover border border-gray-200' 
      }),
      h('div', { class: 'flex flex-col' }, [
        h('span', { class: 'font-semibold text-gray-800' }, [row.name]),
        h('span', { class: 'text-xs text-gray-400' }, [row.sku])
      ])
    ])
  },
  {
    field: 'price',
    header: 'Price',
    align: 'right',
    body: (row) => h('span', { class: 'font-mono text-green-600' }, [formatCurrency(row.price)])
  },
  {
    field: 'actions',
    header: 'Actions',
    align: 'center',
    width: '150px',
    body: (row) => h('div', { class: 'flex gap-2 justify-center' }, [
      h(NButton, { 
        size: 'sm', 
        variant: 'glass',
        onClick: (e) => {
          e.stopPropagation()
          editProduct(row)
        }
      }, ['✏️']),
      h(NButton, { 
        size: 'sm', 
        variant: 'danger',
        onClick: (e) => {
          e.stopPropagation()
          deleteProduct(row)
        }
      }, ['🗑️'])
    ])
  }
]

const products = signal([
  { id: 101, name: 'Wireless Headphones', sku: 'HD-992', price: 99.99, image: 'https://placehold.co/100' },
  { id: 102, name: 'Mechanical Keyboard', sku: 'KB-881', price: 149.50, image: 'https://placehold.co/100' }
])
</script>

<template>
  <NDataTable :columns="columns" :data="products.value" />
</template>
Custom Header Example (With Badges & Icons)

You can also customize the headers of the table columns using the headerTemplate function property:

html
<script setup>
import { signal, h } from 'nexa-framework'
import { NDataTable } from 'nexa-ui-kit'

const columns = [
  { field: 'name', header: 'Name' },
  { 
    field: 'notifications', 
    header: 'Notifications',
    headerTemplate: (col) => h('div', { class: 'flex items-center gap-1.5' }, [
      h('span', null, ['🔔']),
      h('span', null, [col.header]),
      h('span', { class: 'px-1.5 py-0.5 text-xs bg-blue-100 text-blue-700 rounded-full' }, ['2'])
    ])
  }
]

const data = signal([
  { id: 1, name: 'System Logs', notifications: 'Warnings detected' }
])
</script>

<template>
  <NDataTable :columns="columns" :data="data.value" />
</template>

Emits

EventParametersDescription
update:selectionvalue: anyTriggered when row selection updates
sort{ field: string, order: number }Triggered on column sorting action
page{ first: number, rows: number }Triggered on paginated page changes

Example

html
<script setup>
import { signal } from 'nexa-framework'
import { NDataTable } from 'nexa-ui-kit'

const columns = [
  { field: 'name', header: 'Name', sortable: true },
  { field: 'email', header: 'Email' }
]

const users = signal([
  { id: 1, name: 'Alice', email: 'alice@nexa.dev' },
  { id: 2, name: 'Bob', email: 'bob@nexa.dev' }
])
</script>

<template>
  <NDataTable
    :columns="columns"
    :data="users.value"
    :paginator="true"
    :rows="5"
  />
</template>

NPaginator

Independent standalone navigator controller supporting pagination range selections.

Props

PropTypeDefaultDescription
totalRecordsnumber0Total records length
rowsnumber10Visible records scale limit per page
firstnumber0Current offset index
rowsPerPageOptionsnumber[][5, 10, 20, 50]Dropdown page limit scale choices

Emits

EventParametersDescription
pageChange{ first: number, rows: number }Triggered on navigation

Example

html
<script setup>
import { signal } from 'nexa-framework'
import { NPaginator } from 'nexa-ui-kit'

const offset = signal(0)
const rowsPerPage = signal(10)

const onPage = (event) => {
  offset.value = event.first
  rowsPerPage.value = event.rows
}
</script>

<template>
  <NPaginator
    :totalRecords="120"
    :first="offset.value"
    :rows="rowsPerPage.value"
    @pageChange="onPage"
  />
</template>

NTreeMenu

Recursive hierarchal navigation trees.

Props

PropTypeDefaultDescription
itemsany[][]Hierarchical nodes ({ label, key, children })
modelValueanynullSelected active tree node ID key
selectionModestring'single'Selected item schemes
expandAllbooleanfalseAutomatically expands all folders

Emits

EventParametersDescription
update:modelValuevalue: anySelected key update

Example

html
<script setup>
import { signal } from 'nexa-framework'
import { NTreeMenu } from 'nexa-ui-kit'

const selectedNode = signal(null)
const items = [
  {
    label: 'Documents',
    key: 'docs',
    children: [
      { label: 'Resume.pdf', key: 'resume' },
      { label: 'Invoice.json', key: 'invoice' }
    ]
  }
]
</script>

<template>
  <NTreeMenu
    v-model="selectedNode"
    :items="items"
  />
</template>

User profile avatar placeholder supporting various sizes, border colors, and initials fallback.

Props

PropTypeDefaultDescription
srcstring''Avatar image source URL
namestring''User name (initial fallback)
sizestring'md'Scale sizing (sm, md, lg)
roundedbooleantrueMakes the avatar round
borderbooleanfalseDisplays visual rings

Example

html
<script setup>
import { NAvatar } from 'nexa-ui-kit'
</script>

<template>
  <NAvatar
    src="https://images.nexa.dev/avatar.jpg"
    name="John Doe"
    size="lg"
  />
</template>

NTag

Clean status indicators with closing functions.

Props

PropTypeDefaultDescription
variantstring'primary'Visual scheme style
sizestring'md'Scale size
roundedbooleantruePill style format
closablebooleanfalseRenders close action button

Emits

EventParametersDescription
closenoneTriggered on close button click

Example

html
<script setup>
import { NTag } from 'nexa-ui-kit'
</script>

<template>
  <div class="flex gap-2">
    <NTag variant="success">Completed</NTag>
    <NTag variant="warning" closable>Pending</NTag>
  </div>
</template>

NBadge

Floating indicator tags showing numeric status overlays.

Props

PropTypeDefaultDescription
valueany''Tag value or text
maxnumberundefinedNumeric cap scale limit (e.g. 99+ display)
variantstring'danger'Theme variant style
dotbooleanfalseMinimizes structure badge to simple alert dot

Example

html
<script setup>
import { NBadge, NButton } from 'nexa-ui-kit'
</script>

<template>
  <div class="relative inline-block">
    <NButton>Inbox</NButton>
    <NBadge :value="5" :max="9" />
  </div>
</template>

Feedback & Loading

NAlert

Clean feedback block alerts incorporating close handlers and layout formatting.

Props

PropTypeDefaultDescription
variantstring'info'Alert styles (info, success, warning, danger)
titlestring''Alert header bold label
closablebooleanfalseEnables close button
iconstring''Display icon character

Emits

EventParametersDescription
closenoneTriggered when alert is dismissed

Example

html
<script setup>
import { NAlert } from 'nexa-ui-kit'
</script>

<template>
  <NAlert variant="success" title="Success Notification" closable>
    Your profile has been updated successfully.
  </NAlert>
</template>

NToastContainer

Global toaster system portal. Renders floating status messages triggered via useToast helpers.

Props

PropTypeDefaultDescription
positionstring'top-right'Visual screen location
durationnumber3000Expiration delay inside millisecond scale
maxToastsnumber5Maximum stacked displays

useToast Hook

javascript
import { useToast } from 'nexa-ui-kit'

const { success, error, info, warning } = useToast()

success('Successfully saved!')
error('Failed to authenticate.')

Example

html
<script setup>
import { NToastContainer, NButton, useToast } from 'nexa-ui-kit'

const { success } = useToast()
</script>

<template>
  <NToastContainer position="top-right" :duration="4000" />
  <NButton @click="success('Notification sent!')">Show Toast</NButton>
</template>

NProgressBar

Modern, fluid progress bars.

Props

PropTypeDefaultDescription
valuenumber0Active value progression scale
maxnumber100Maximum limit
variantstring'primary'Style variant theme
stripedbooleanfalseRenders striped indicator blocks
animatedbooleanfalseAnimates stripe sequences
showValuebooleanfalseRenders overlay value percentage label

Example

html
<script setup>
import { NProgressBar } from 'nexa-ui-kit'
</script>

<template>
  <NProgressBar :value="70" :max="100" showValue striped animated />
</template>

NSkeleton

Dynamic layout content skeletons rendering sleek animation loading loops.

Props

PropTypeDefaultDescription
variantstring'text'Skeleton shapes (text, circle, rect)
widthstring'100%'Target width
heightstring'1rem'Target height
animatedbooleantrueAnimates loading shimmer effects

Example

html
<script setup>
import { NSkeleton } from 'nexa-ui-kit'
</script>

<template>
  <div class="flex flex-col gap-2 p-4">
    <NSkeleton variant="circle" width="48px" height="48px" />
    <NSkeleton variant="text" width="60%" height="1.2rem" />
    <NSkeleton variant="rect" width="100%" height="120px" />
  </div>
</template>

NTooltip

Accessible interactive tooltips using Teleport and smart viewport orientation positioning.

Props

PropTypeDefaultDescription
contentstring''Text displayed in overlay
positionstring'top'Preferred overlay location (top, bottom, left, right)
triggerstring'hover'Interaction trigger event (hover, focus, click)
disabledbooleanfalseDisables tooltip overlay

Example

html
<script setup>
import { NTooltip, NButton } from 'nexa-ui-kit'
</script>

<template>
  <NTooltip content="Delete permanently" position="top">
    <NButton variant="danger">Delete</NButton>
  </NTooltip>
</template>

Form Container & Validation

NForm

Robust wrapping structures managing rules, states, and global field validation routines.

Props

PropTypeDefaultDescription
rulesRecord<string, any>{}Validation rules mapping
modelValueRecord<string, any>{}Form values data object

Emits

EventParametersDescription
submitevent: EventTriggered when form submits with validation passing

Example

html
<script setup>
import { signal } from 'nexa-framework'
import { NForm, NFormField, NInput, NButton } from 'nexa-ui-kit'

const formData = signal({
  email: ''
})

const rules = {
  email: [
    { required: true, message: 'Email address is required' }
  ]
}

const handleSubmit = () => {
  console.log('Form validated successfully!')
}
</script>

<template>
  <NForm :modelValue="formData.value" :rules="rules" @submit="handleSubmit">
    <NFormField prop="email" label="Email Address" required>
      <NInput v-model="formData.value.email" placeholder="Enter email" />
    </NFormField>
    <NButton type="submit" class="mt-4">Register</NButton>
  </NForm>
</template>

NFormField

Helper field label layout mapping validation states and errors.

Props

PropTypeDefaultDescription
propstring''Field key property name (matches NForm rules)
labelstring''Display field label
requiredbooleanfalseAppends visual required asterisk
errorstring''Custom active error overrides

Released under the MIT License.