Skip to content

Descriptions

Displays multiple read-only fields in groups, commonly used for displaying information on detail pages.

Basic Usage

Application Details
App ID:YH-Admin-EdgeVersion:v2.5.4-StableNode:Production-Cluster-01
Status:RunningEntry: No.1188, Wuzhong Avenue, Wuzhong District, Production-Cluster-01, Jiangsu Province
Application Details
App IDYH-Admin-EdgeVersionv2.5.4-StableNodeProduction-Cluster-01
StatusRunningEntry No.1188, Wuzhong Avenue, Wuzhong District, Production-Cluster-01, Jiangsu Province
Basic Usage

Custom Sizes

Vertical Layout with Border
App IDVersionNode
YH-Admin-Edgev2.5.4-StableProduction-Cluster-01
StatusEntry
Running No.1188, Wuzhong Avenue, Wuzhong District, Production-Cluster-01, Jiangsu Province
Vertical Layout without Border
App IDVersionNode
YH-Admin-Edgev2.5.4-StableProduction-Cluster-01
StatusEntry
Running No.1188, Wuzhong Avenue, Wuzhong District, Production-Cluster-01, Jiangsu Province
Custom Sizes

Long Content

When a description item contains long text, the component automatically wraps lines and displays them correctly.

Long Content Display
Product Name Apple MacBook Pro 16-inch M3 Max Chip Laptop Price $3,499.00
Description Equipped with the M3 Max chip, featuring a 14-core CPU, 30-core GPU, and 16-core Neural Engine. Supports up to 128GB of unified memory and up to 8TB of storage space. 16.2-inch Liquid Retina XDR display with peak brightness up to 1600 nits, ProMotion adaptive refresh rate technology, and True Tone display. MagSafe 3 charging port, three Thunderbolt 4 ports, HDMI port, SDXC card slot, high-impedance headphone jack. Six-speaker sound system with spatial audio. 1080p FaceTime HD camera. Touch ID. Magic Keyboard with a full-height function key row (including Touch ID). Force Touch trackpad. Up to 22 hours of battery life.
TagsOfficialLimited OfferHot SaleStatusIn Stock
Long Content

Custom Styles

Core Performance Panel
App ID YH-Admin-Edge Versionv2.5.4-StableNodeProduction-Cluster-01
StatusRunningEntry No.1188, Wuzhong Avenue, Wuzhong District, Production-Cluster-01, Jiangsu Province
Custom Styles

Use in Nuxt

Descriptions component fully supports SSR rendering in Nuxt 3/4. It's automatically imported in Nuxt projects.

User Details
UsernameYH-Admin-EdgeEmailtest@example.comRegistration Time2024-01-01
Use in Nuxt

SSR Notes:

  • ✅ Fully supports all Props and styles
  • ✅ Renders slot content correctly
  • ✅ Dynamic size switching works as expected
  • ✅ Custom styles are SSR-safe

SSR Safety

The Descriptions component has undergone comprehensive SSR testing to ensure server and client rendering are perfectly consistent.

API

Props

PropDescriptionTypeDefault
titleTitle of the liststring
extraExtra operation area text, can also be passed via extra slotstring
borderWhether to show borderbooleanfalse
columnNumber of columns per rownumber3
directionArrangement direction'horizontal' | 'vertical''horizontal'
sizeList size'large' | 'default' | 'small''default'
colonWhether to show colon (works when no border)booleantrue
label-styleCustom label styleCSSProperties
content-styleCustom content styleCSSProperties
label-class-nameCustom label class namestring
content-class-nameCustom content class namestring

Item Props

PropDescriptionTypeDefault
labelLabel textstring
spanNumber of columns occupiednumber1
widthColumn widthstring | number
min-widthMinimum column widthstring | number
alignContent alignment'left' | 'center' | 'right''left'
label-alignLabel alignment'left' | 'center' | 'right''left'
class-nameCustom content class namestring
label-class-nameCustom label class namestring
label-styleCustom label styleCSSProperties
content-styleCustom content styleCSSProperties

Slots

Slot NameDescription
defaultContent of descriptions, usually YhDescriptionsItem
titleCustom title, overrides title prop
extraCustom extra area, overrides extra prop

Item Slots

Slot NameDescription
defaultItem content
labelCustom label content, overrides label prop

Expose

PropDescriptionType
No exposed attributes

Theme Variables

The Descriptions component uses the following CSS variables for customization:

VariableDescriptionDefault
--yh-descriptions-header-margin-bottomMargin bottom of header20px
--yh-descriptions-title-font-sizeTitle font size16px
--yh-descriptions-extra-font-sizeExtra area font size14px
--yh-descriptions-border-colorBorder colorvar(--yh-border-color-lighter)
--yh-descriptions-item-font-sizeCell font size
--yh-descriptions-cell-padding-vCell vertical padding
--yh-descriptions-cell-padding-hCell horizontal padding

Size System Variables

The size attribute automatically toggles --yh-descriptions-item-font-size and padding variables. These variables are associated with the global YH-UI size system (e.g., --yh-component-size-default-padding) to ensure consistent sizing across the library.

Released under the MIT License.