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 SSR-safe rendering for props, slots, and border layout
  • Slot content and custom styles render consistently across server and client
  • Size switching and vertical layout are driven by props only, so hydration stays stable

SSR Safety

The Descriptions component is table-like presentational UI driven entirely by props and slots, which makes it a naturally stable SSR component in Nuxt pages.

API

Props

PropDescriptionTypeDefault
titleTitle of the liststringundefined
extraExtra operation area text. Can also be provided through the extra slotstringundefined
borderWhether to show borderbooleanfalse
columnNumber of columns per rownumber3
directionArrangement direction'horizontal' | 'vertical''horizontal'
sizeList size'large' | 'default' | 'small''default'
colonWhether to show colon when border is disabledbooleantrue
label-styleCustom label styleCSSPropertiesundefined
content-styleCustom content styleCSSPropertiesundefined
label-class-nameCustom label class namestring''
content-class-nameCustom content class namestring''
theme-overridesComponent-level theme overridesComponentThemeVarsundefined

Types

Descriptions 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 styleCSSPropertiesundefined
content-styleCustom content styleCSSPropertiesundefined

Slots

ComponentSlot NameDescription
YhDescriptionsdefaultContent of descriptions, usually YhDescriptionsItem
YhDescriptionstitleCustom title, overrides title prop
YhDescriptionsextraCustom extra area, overrides extra prop
YhDescriptionsItemdefaultItem content
YhDescriptionsItemlabelCustom label content, overrides label prop

Events

This component does not expose component events.

Expose

This component does not expose public instance methods or properties.

Theme Variables

The Descriptions component uses the following CSS variables for customization:

VariableDescriptionDefault
--yh-descriptions-header-margin-bottomHeader bottom spacing20px
--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 sizeUses the current size preset
--yh-descriptions-cell-padding-vCell vertical paddingUses the current size preset
--yh-descriptions-cell-padding-hCell horizontal paddingUses the current size preset

Size System Variables

The size prop automatically switches the item font size and padding variables so the component stays aligned with the shared YH-UI size system.

Type Exports

NameDescription
YhDescriptionsPropsProps type for YhDescriptions
YhDescriptionsSlotsSlots type for YhDescriptions
YhDescriptionsItemPropsProps type for YhDescriptionsItem
YhDescriptionsItemSlotsSlots type for YhDescriptionsItem
YhDescriptionsInstancePublic instance type for YhDescriptions
YhDescriptionsItemInstancePublic instance type for YhDescriptionsItem

Released under the MIT License.