Skip to main content
PROYECTOVIVIANA

Toast

The props declared for Toast, generated from the types @proyecto-viviana/ui ships.

Import

import { Toast } from "@proyecto-viviana/ui";

Props

Props for Toast in @proyecto-viviana/ui
PropTypeDefaultDescription
classstring—Additional CSS class name.
indexAccessor<number>—Internal index accessor used by ToastRegion for S2 stack rendering.
visibleToastsAccessor<QueuedToast<HeadlessToastContent>[]>—Internal visible toasts accessor used by ToastRegion for S2 stack rendering.
isExpandedAccessor<boolean>—Internal expanded stack state accessor used by ToastContainer.
onToggleExpanded() => void—Internal stack expansion handler used by ToastContainer.
canExpandfalse | true—Whether a ToastContainer is present to drive stack expansion. When false (a bare ToastRegion, which has no expand/collapse context), the collapsed-stack "Show all" affordance is hidden because it cannot be honored — mirroring the upstream split where ToastContainer, not the low-level region, owns expansion.
placementEdge'top' | 'bottom'—Internal placement edge used for collapsed background stack positioning.
placementAlign'end' | 'center'—Internal placement alignment used for the toast's view-transition-class.
childrennumber | boolean | RenderedElement | ArrayElement | (string & {}) | Node | JSX.ArrayElement | ((renderProps: ToastRenderProps) => JSX.Element)—The children of the component - can be JSX or render function. solidaria-components
refHTMLElement | ((el: HTMLElement) => void) | { current?: HTMLElement | null | undefined; } | RefLike<HTMLElement>[]—Optional ref for the toast root element. solidaria-components
idstring—DOM id for the toast root. solidaria-components
aria-describedbystring—Identifies the element (or elements) that describes the object. solidaria
aria-detailsstring—Identifies the element (or elements) that provide a detailed, extended description for the object. solidaria
aria-labelstring—Defines a string value that labels the current element. solidaria
aria-labelledbystring—Identifies the element (or elements) that labels the current element. solidaria
toast*QueuedToast<ToastContent>—The toast data. solidaria-components

Declared in packages/viviana-ui/src/toast/index.tsx.

ToastContainer props

Props for ToastContainer in @proyecto-viviana/ui
PropTypeDefaultDescription
PRIVATE_forceReducedMotionfalse | true—Forces reduced-motion toast animations regardless of the user's `prefers-reduced-motion` setting. Mirrors
placement'top' | 'bottom' | 'bottom end' | 'top end'"bottom"Placement of the toast container on the page.
classstring—Additional CSS class name.
refHTMLElement | ((el: HTMLElement) => void) | { current?: HTMLElement | null | undefined; } | RefLike<HTMLElement>[]—Optional ref for the region element. solidaria-components
aria-labelstring—Accessible label for the region. solidaria-components
stateToastState<ToastContent>—The toast state to display. If not provided, uses ToastContext. solidaria-components
portalfalse | true—Whether to render in a portal. solidaria-components

Declared in packages/viviana-ui/src/toast/index.tsx.

ToastProvider props

Props for ToastProvider in @proyecto-viviana/ui
PropTypeDefaultDescription
children*JSX.Element—The children of the provider. solidaria-components
queueOptionsToastQueueOptions—Custom toast queue options. solidaria-components
useGlobalQueuefalse | true—Use global queue instead of creating a new one. solidaria-components

Declared in packages/viviana-ui/src/toast/index.tsx.

ToastRegion props

Props for ToastRegion in @proyecto-viviana/ui
PropTypeDefaultDescription
placement'top' | 'bottom' | 'bottom end' | 'top end'"bottom"Placement of the toast container on the page.
classstring—Additional CSS class name.
refHTMLElement | ((el: HTMLElement) => void) | { current?: HTMLElement | null | undefined; } | RefLike<HTMLElement>[]—Optional ref for the region element. solidaria-components
aria-labelstring—Accessible label for the region. solidaria-components
stateToastState<ToastContent>—The toast state to display. If not provided, uses ToastContext. solidaria-components
portalfalse | true—Whether to render in a portal. solidaria-components

Declared in packages/viviana-ui/src/toast/index.tsx.

Props marked solidaria or solidaria-components come from the headless layer underneath and behave the same in both registers. Components that wrap a DOM element also accept that element's standard attributes, which are left out here on purpose — listing them would bury the props that are actually ours.