Skip to main content
Version: Next

Slot API

import { Slot } from '@editora/ui-react';

Props​

PropTypeDescription
align'start' | 'center' | 'end'
fallbackstring
headlessboolean
inlineboolean
namestring
onMissing() => void
onResolved() => void
onSlotChange(detail: SlotChangeDetail) => void
requiredboolean
size'sm' | 'md' | 'lg'
tone'brand' | 'success' | 'warning' | 'danger'
variant'plain' | 'surface' | 'outline' | 'soft' | 'chip' | 'contrast'

Also accepts the standard HTML and React props of the element it renders (className, style, id, aria-*, data-*, event handlers).

Element: <ui-slot>​

Slot renders the ui-slot custom element from @editora/ui-core, which can also be used without React.

Attributes: align, fallback, headless, inline, name, required, size, tone, variant

Events: missing, resolved, slotchange