For vue2 projects, use @94ai/common-ui
LLMs.md

Button ​

Basic types ​

Default and semantic types

Plain, text and shapes ​

States and shapes

Disabled and loading ​

Disabled and loading

Loading disables the native button, shows a spinning SVG and hides the normal icon without requiring Element UI fonts. Disabled/loading buttons do not emit click.

Sizes ​

Legacy sizes

The default remains mini (12px font, 7px × 12px padding), not Element Plus's default. medium uses 14px and 10px × 12px; small uses 12px and 9px × 12px.

Interaction, icons and native forms ​

Loading example…
Interaction, icons and native forms

icon accepts legacy class strings or Vue icon components. Common legacy names (el-icon-search/edit/check/message/star-off/delete/plus/close/download/upload) map to built-in SVGs. Other strings remain CSS classes; consumers supply their fonts/styles, just as before. Element Plus does not include the Element UI icon font: replace unmapped names with a component, such as :icon="Search" imported from @element-plus/icons-vue. Give icon-only buttons an aria-label.

Global configuration ​

NfConfigProvider accepts all button props through nf-button. Explicit button values (including false) win; nested providers inherit per property and update reactively. The fallback size remains mini. This configuration is separate from Element Plus's top-level size / button.

vue
<NfConfigProvider :nf-button="{ size: 'medium', type: 'primary', loading: true }">
  <NfButton>Inherited</NfButton>
  <NfButton size="small" :loading="false">Local override</NfButton>
</NfConfigProvider>

See the interactive provider example.

On-demand installation ​

ts
import NfButton from '@94ai-plus/nf-button'
import '@94ai-plus/nf-theme-chalk/nf-button.css'

app.use(NfButton)

For OEM use @94ai-plus/nf-theme-oem/nf-button.css. Installing CommonUI already registers NfButton. Named imports and CommonUIResolver() are supported. The component's standalone CSS entry is @94ai-plus/nf-button/style.css.

Props ​

PropDescriptionType / valuesDefault
typeSemantic typeprimary / success / info / warning / danger / text—
sizeLegacy sizemini / small / mediummini
iconIcon class or Vue componentstring / Component—
plainPlain buttonbooleanfalse
textText button; also enabled by type="text"booleanfalse
roundRounded cornersbooleanfalse
circleCircular buttonbooleanfalse
loadingShow loading and block clicksbooleanfalse
disabledDisable buttonbooleanfalse
autofocusNative autofocusbooleanfalse
native-typeNative form behaviorbutton / submit / resetbutton

Undeclared attributes such as id, class, style, name, value, aria-* and data-* fall through to the native button. Vue 3 listener fallthrough replaces Vue 2 .native. Keyboard :focus-visible styles do not change mouse states.

Events and slots ​

NameContract
click(event: MouseEvent) => void, preserving the native event
defaultButton content; no content span is generated when absent