Ga naar hoofdinhoud

CnSettingsSection

Admin settings section with loading and error states. Wraps NcSettingsSection with async data fetching patterns.

Wraps: NcSettingsSection, NcLoadingIcon, NcButton, NcNoteCard

Try it

Loading CnSettingsSection playground…

CnSettingsSection showing admin settings with Version and Register Configuration sections

CnSettingsSection showing admin settings with Version and Register Configuration sections

Props

PropTypeDefaultDescription
nameString(required)Section title (passed to NcSettingsSection)
descriptionString''Brief section description shown under the title
detailedDescriptionString''Longer description rendered in a separate block below the title
docUrlString''Documentation URL — shows an info icon link next to the title
loadingBooleanfalseLoading state — shows a loading indicator instead of content
loadingMessageString'Loading...'Message shown during loading
errorBooleanfalseError state — shows an error card with optional retry button
errorMessageString'An error occurred'Message shown in error state
onRetryFunctionnullCallback for the retry button. When null, no retry button is shown.
retryButtonTextString'Retry'Label for the retry button
emptyBooleanfalseEmpty state — shows an empty message instead of content
emptyMessageString'No data available'Message shown when the section has no data

Slots

SlotDescription
defaultSection content
#actionsExtra action buttons
#descriptionCustom description content (replaces description prop)
#footerFooter content rendered below the section body
#emptyCustom empty state (replaces the default empty message)

Usage

<CnSettingsSection
name="API Configuration"
description="Configure the external API connection"
:loading="loading"
:error="hasError"
error-message="Could not load settings"
:on-retry="fetchSettings">
<NcTextField label="API URL" v-model="apiUrl" />
<NcTextField label="API Key" v-model="apiKey" type="password" />
</CnSettingsSection>

Reference (auto-generated)

The tables below are generated from the SFC source via vue-docgen-cli. They reflect what's actually in CnSettingsSection.vue and update automatically whenever the component changes.

Props

NameTypeRequiredDefaultDescription
namestringSection name/title
descriptionstring''Brief section description (shown under title by NcSettingsSection)
detailedDescriptionstring''Detailed description shown in a separate block below the title
docUrlstring''Documentation URL (shows info icon next to title)
loadingbooleanfalseWhether the section is in a loading state
loadingMessagestring() =&gt; t('nextcloud-vue', 'Loading...')Message shown during loading
errorbooleanfalseWhether the section is in an error state
errorMessagestring() =&gt; t('nextcloud-vue', 'An error occurred')Message shown when in error state
onRetryfuncnullCallback function for retry button (shown in error state). If null, no retry button is shown.
retryButtonTextstring() =&gt; t('nextcloud-vue', 'Retry')Text for the retry button
emptybooleanfalseWhether the section has no data to show
emptyMessagestring() =&gt; t('nextcloud-vue', 'No data available')Message shown when section is empty

Slots

NameBindingsDescription
actions
description
default
empty
footer