funkwhale/front/ui-docs/components/ui/layout/header.md

1.5 KiB

import Header from "~/components/ui/Header.vue";

Page header

Place the Header at the beginning of a page. Choose an appropriate heading level: h1 or h2 or h3. Choose h1 unless the header is part of a page subsection or a modal.

<Header h1="My title" />

Add an image

Use the <template #image> slot to place a picture to the left of the header.

<Header h1="My title">
  <template #image>
    <img
    src="https://images.unsplash.com/photo-1524650359799-842906ca1c06?ixlib=rb-1.2.1&dl=te-nguyen-Wt7XT1R6sjU-unsplash.jpg&w=640&q=80&fm=jpg&crop=entropy&cs=tinysrgb" />
  </template>
</Header>
My subtitle
A B C

Add an action to the right of the heading

-> Use the action prop which is the same as in the Section component.