Fixed Toolbar

PreviousNext

A fixed toolbar that stays at the top of the editor.

Docs
plateui

Preview

Loading preview…
registry/ui/fixed-toolbar.tsx
'use client';

import { cn } from '@/lib/utils';

import { Toolbar } from './toolbar';

export function FixedToolbar(props: React.ComponentProps<typeof Toolbar>) {
  return (
    <Toolbar
      {...props}
      className={cn(
        'scrollbar-hide sticky top-0 left-0 z-50 w-full justify-between overflow-x-auto rounded-t-lg border-b border-b-border bg-background/95 p-1 backdrop-blur-sm supports-backdrop-blur:bg-background/60',
        props.className
      )}
    />
  );
}

Installation

npx shadcn@latest add @plate/fixed-toolbar

Usage

import { FixedToolbar } from "@/components/ui/fixed-toolbar"
<FixedToolbar />