Skip to content

Block Item

A container component designed to wrap and display content blocks with consistent styling and layout.

Usage

html
<block-item title="User Information" :collapsible="true">
  <p>Content goes here...</p>
</block-item>

Props

PropTypeDefaultDescription
titlestring''Optional title for the block
collapsiblebooleanfalseWhether the block can be collapsed
collapsedbooleanfalseInitial collapsed state
paddingstring'default'Padding size: 'none', 'small', 'default', 'large'
borderbooleantrueWhether to show border
shadowbooleanfalseWhether to show shadow

Events

EventPayloadDescription
collapsebooleanEmitted when block is collapsed/expanded

Features

  • Consistent Styling: Provides uniform appearance for content blocks
  • Collapsible: Optional collapse/expand functionality
  • Flexible Padding: Multiple padding options for different use cases
  • Title Support: Optional title header for the block

Examples

Basic Block Item

html
<block-item>
  <div class="user-profile">
    <img :src="user.avatar" />
    <h3>{{ user.name }}</h3>
    <p>{{ user.email }}</p>
  </div>
</block-item>

With Title and Collapse

html
<block-item 
  title="Advanced Settings"
  :collapsible="true"
  v-model:collapsed="settingsCollapsed"
>
  <el-form>
    <el-form-item label="API Key">
      <el-input v-model="apiKey" type="password" />
    </el-form-item>
    <el-form-item label="Webhook URL">
      <el-input v-model="webhookUrl" />
    </el-form-item>
  </el-form>
</block-item>

Custom Padding

html
<block-item padding="large" :shadow="true">
  <chart-container :data="chartData" />
</block-item>

© Velocitech LTD. All rights reserved.

Build SaaS Products Without Limits.