Dev Helpers
← Back

Sticky action footer

Import and render <StickyActionFooter /> in a React project.

Open this example in the interactive library

Live preview

Source code

// components/StickyActionFooter.tsx

import type { ReactNode } from "react";

export default function StickyActionFooter({
  children = "Your content",
  aside = "Notes",
}: { children?: ReactNode; aside?: ReactNode } = {}) {
  return (
    <section>
      {children}
      <footer
        style={{
          position: "sticky",
          bottom: 0,
          padding: "1rem",
          background: "Canvas",
          borderTop: "1px solid",
        }}
      >
        {aside}
      </footer>
    </section>
  );
}