Components
Sticky Bottom CTA
A sticky bottom bar pairing context with a primary action.
Installation
$ npx veil-ui@latest add sticky-bottom-ctaUsage
import { StickyBottomCta } from "@/components/ui/sticky-bottom-cta";
<StickyBottomCta
label="$24 / month"
description="Billed monthly"
action={<Button>Start trial</Button>}
/>;Examples
Basic
Plan details
Unlimited projects, 10 seats, priority support.
Cancel anytime from your dashboard.
Taxes calculated at checkout.
$24 / month
Billed monthly
Checkout
Shipping address
221B Baker Street, London
Payment
Visa ending in 4242
Total $129.00
Including shipping
API reference
The package exports sticky-bottom-cta along with its composable parts. It forwards standard attributes to its root element; see the examples above for the component-specific props.
Accessibility
- Touch targets are large enough to tap comfortably and keep visible focus rings for keyboard and switch users.
- Gesture interactions (swipe, pull to refresh) have visible button alternatives so they are not the only way to act.
- Sheets, drawers and dialogs follow the underlying accessible primitives for focus trapping and escape handling.
Vue and plain HTML
This component also ships for Vue (Reka UI) and plain HTML. Install it with npx veil-ui add sticky-bottom-cta --framework vue or switch the framework in components.json.
<script setup lang="ts">
import { cn } from "@/lib/utils";
const props = defineProps<{
label?: string;
description?: string;
class?: string;
}>();
</script>
<template>
<div
data-slot="sticky-bottom-cta"
:class="
cn(
'sticky bottom-0 z-30 flex items-center justify-between gap-3 border-t bg-background/95 px-4 py-3 pb-[max(0.75rem,env(safe-area-inset-bottom))] backdrop-blur',
props.class,
)
"
>
<div class="min-w-0">
<p v-if="label || $slots.label" class="truncate text-sm font-semibold">
<slot name="label">{{ label }}</slot>
</p>
<p
v-if="description || $slots.description"
class="truncate text-xs text-muted-foreground"
>
<slot name="description">{{ description }}</slot>
</p>
<slot />
</div>
<div v-if="$slots.action" class="shrink-0">
<slot name="action" />
</div>
</div>
</template>