Vela UI Docsvenizia.ai

square

Square, one of the 856 Vela UI icons, in the General group: a 24px grid drawn in currentColor, so it takes the colour of the text around it. It installs on its own as @velaui/icon-square.

  • 16px
  • 20px
  • 24px
  • 32px

Installation

pnpm dlx velaui add @velaui/icon-square

Usage

// components/icons/square.tsx
import Square from "@/components/icons/square"

<Square className="size-5 text-muted" />

In use

  • In a button

  • In a sentence

    Due Friday, or whenever the venue confirms.

  • In an input

  • As a badge

    Scheduled
  • In an empty state

    No events on this day yet.

    Browse blocks

Source

import * as React from "react";

export interface SquareProps extends React.SVGProps<SVGSVGElement> {
  size?: number | string;
}

/** Custom vela-ui icon, synced from Figma (node under section "Icons"). */
export function Square({ size = 24, strokeWidth = 1, className, ref, ...props }: SquareProps) {
  return (
    <svg
      ref={ref}
      width={size}
      height={size}
      viewBox="0 0 24 24"
      fill="none"
      strokeWidth={strokeWidth}
      className={className}
      {...props}
    >
      <path d="M18 2.40039C19.9882 2.40039 21.6 4.01217 21.6 6.00039V18.0005C21.6 19.9887 19.9882 21.6005 18 21.6005H6.00002C4.0118 21.6005 2.40002 19.9887 2.40002 18.0005L2.40003 6.00039C2.40003 4.01217 4.0118 2.40039 6.00003 2.40039L18 2.40039Z" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round"/>
    </svg>
  );
}
Square.displayName = "Square";

export default Square;