NpCell

Cell component.

Basic Usage

Use type to specify the control type. Supports checkbox / radio / switch controls, icons and right arrows.

浏览器不支持,请手动复制 basic.en.vue

Size

Use size to set the size.

浏览器不支持,请手动复制 size.en.vue

Bottom Border

Use bordered to show the bottom border.

浏览器不支持,请手动复制 bordered.en.vue

Props

PropDescriptionTypeDefault
v-model:checkedChecked state of the controlbooleanfalse
typeControl type on the left'checkbox' | 'radio' | 'switch'-
hoverWhether to enable hover statebooleantrue if type is set, otherwise false
iconLeft iconVNode | () => VNode-
labelCell labelstring | VNode | () => VNode-
valueCell valuestring | VNode | () => VNode-
descriptionCell descriptionstring | VNode | () => VNode-
arrowWhether to show the right arrowbooleanfalse
borderedWhether to show the bottom border of the content areabooleanfalse
sizeCell size'small' | 'medium' | 'large''medium'

Slots

NameDescription
footerBottom content, displayed below the main content area

Events

EventDescriptionCallback
update:checkedTriggered when the control state changes(value: boolean) => void

Global Defaults

Use NpConfigProvider to change the default props globally. Props passed to the component itself always win.

<np-config-provider :component-options="{ Cell: { size: 'large', arrow: true } }">
  <np-cell label="Cell" />
</np-config-provider>