User

Flexible User Profile Component.

import { User } from '@nextui-org/react';

Default

The default User display User Image with Text on Screen.

Sizes

The User comes in 5 sizes and you can also set a custom size in px with size property.

Bordered

You can change the full style to a bordered User with the bordered property.

Colors

You can change the color of border with color prop.

Zoomed

You can apply a zoom animation to User with the zoomed property.

Pointer

Display pointer cursor on hover.

Squared

You can change the full style to a squared User with the squared property.

Description

You can add a info text under the name.

You can Add a Link Below Name Using User.Link Component

APIs

User Props

AttributeTypeAccepted valuesDescriptionDefault
colorNormalColors stringNormalColorsChange User Profile border colordefault
srcstring-Image source (local or remote)-
namestring-Display Text Next to Image-
textstring-Display Text when image is missing-
altstring-Display alt text when image is missing-
sizeNormalSizes numberNormalSizesUser Profile sizemedium
borderedbooleantrue/falseBordered User Profilefalse
zoomedbooleantrue/falseZoomed User Profilefalse
pointerbooleantrue/falseDisplay pointer cursor on hoverfalse
squaredbooleantrue/falseSquared User Profilefalse
cssStitches.CSS-Override Default CSS style-
askeyof JSX.IntrinsicElements-Changes which tag component outputsspan
...ImgHTMLAttributes'alt', 'crossOrigin', 'className', ...Native props-

User types

Simple Colors

type NormalColors =
  | 'default'
  | 'primary'
  | 'secondary'
  | 'success'
  | 'warning'
  | 'error';

Normal Sizes

type NormalSizes = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
gradient blue backgroundgradient violet background