Skip to content

Square

<pa-square> | PaSquare

A square-shaped container component with rounded corners for displaying icons, badges, or other content. Perfect for avatars, status indicators, and decorative elements with consistent sizing and theming.

vue
<pa-square variant="primary">
  <pa-icon icon="user-light" />
</pa-square>

Examples

Basic Usage

vue
<template>
  <div style="display: flex; gap: 0.5rem;">
    <pa-square variant="primary">
      <pa-icon icon="user-light" />
    </pa-square>
    <pa-square variant="secondary">
      <pa-icon icon="cog-light" />
    </pa-square>
    <pa-square variant="success">
      <pa-icon icon="check-light" />
    </pa-square>
  </div>
</template>

Sizes

vue
<template>
  <div style="display: flex; gap: 0.5rem; align-items: center;">
    <pa-square variant="primary" size="sm">
        <pa-icon icon="user-regular" size="sm"/>
    </pa-square>
    <pa-square variant="primary" size="md">
        <pa-icon icon="user-regular" size="md"/>
    </pa-square>
    <pa-square variant="primary" size="lg">
        <pa-icon icon="user-regular"size="lg" />
    </pa-square>
    <pa-square variant="primary" size="xl">
        <pa-icon icon="user-regular" size="xl"/>
    </pa-square>
  </div>
</template>

Importing

js
import { PaSquare } from '@payadvantage/ui-components'

Slots

Slot NameDescription
defaultContent to display inside the square container (typically icons or text)

Properties

PropertyTypeDefaultDescription
variantStringnullColor theme: 'primary', 'secondary', 'success', 'info', 'danger', 'light', 'dark'
sizeString'md'Size of the square: 'sm' (32px), 'md' (40px), 'lg' (80px), 'xl' (120px)

Events

EventParametersDescription
clickevent: MouseEventEmitted when the square is clicked

Dependencies

  • pa-icon - Commonly used together for icon containers