Use to display content in reusable wrappers like page sections, containers, etc.
resources/js/Components/Sections/SectionWrapper.vue
tag?: "div" | "section" | "article"
Defaults to section
.
withoutTopPadding?: boolean
withoutBottomPadding?: boolean
Sections have predefined top and bottom padding to separate page sections by whitespace.
Set any of those 2 props to true
to remove top or bottom padding. This is useful when you want to remove the gap between sections with same background color.
class?: HTMLAttributes["class"]
Override paddings, set background color, etc.
resources/js/Components/Sections/Container.vue
Tailwind container.
Use props to style the look of the component:
layout?: "default" | "full" | "boxed"
Defaults to default
.
Use full
layout when you want to use background without left and right padding.
Use boxed
layout when you want to use background with default left and right padding.
background?: "none" | "primary" | "inverted"
Defaults to none
.
Use primary
to set background in primary color var(--primary)
.
Use inverted
to invert background according to current mode. For light mode, background will be dark, and for dark mode background will be light.
withoutGaps?: boolean
Container is flex with column direction and included vertical gutters between the elements.
Set to false
to remove default gutters.
class?: HTMLAttributes["class"]
Override display, gaps, set background color, etc.
resources/js/Components/AppHeader.vue
Main header of the pages.
Use props to style the look of the component:
sticky?: boolean
Defaults to true
.
Set to false
if you don’t want sticky header.
style?: "default" | "floating"
Defaults to default
.
Use default
to display header in full width with bottom border and no offsets.
Use floating
to display header with borders and slight offset from the edges.
bg?: "default" | "inverted" | "primary" | "transparent"
Defaults to default
.
Use default
to display header in background color defined by var(--background)
.
Use inverted
to display header in background color defined by var(--background)
, but using color from other theme.primary
to display header in background color defined by var(--primary)
.
Use transparent
to display header in semi-transparent background color defined by var(--background)
.
shadow?: boolean
Defaults to true
.
Set to false
to remove shadow from the header.
resources/js/Components/Copyright.vue
.
By default content is © 2024.
resources/js/Components/AppFooter.vue
This layout will display info and links in grid (vertical on small devices, horizontal on large devices).
Info section consists of logo, name, copyright and social media links.
Links are grouped in 3 sections: Links, App and Legal.
You can easily update the layout, change group names, add new groups, etc.
resources/js/Components/AppFooterV2.vue
Content is centered and it consists of logo, important links, less important links (legal pages), social media links and copyright.
Important links are display in 2 or 3 grid columns, depending on screen size.
resources/js/lib/navs.ts
.
Each navigation group should be typed with NavLink[]
.
resources/js/Components/MainMenu.vue
Main menu component is included with AppHeader
.
NavLink
defined in resources/js/types/index.d.ts
.
route('blog.index')
and route('testimonials.index')
. Also, links will be active when current page’s route name starts with blog.
or when current page’s route name is testimonials.index
.
#pricing
or #faq
ID when on index
page. Also, links will redirect to index
page and jump to selected sections when not on index
page.
resources/js/composable/useScrollTo.ts
or per function call:
start
you can also control the scroll offset with scroll margin.
scrollTo
functions is used to direct user to the target section by scrolling (on same page) or redirect (on different page).
When using Link
or a
elements you can pass an event to prevent default behavior.
Function accepts 4 arguments:
a
element or Link
componentbehavior
and block
for native scrollIntoView
functionnavMenuLinkClass
presents the set of predefined classes to style the menu triggers. navMenuWrapperClass
presents the set of predefined classes to style the menu wrapper (defaults to 3 columns). You can customize those in resources/js/Components/MainMenu.vue
.
getMenuContentStyle
is class to calculate dynamic width of the menu. It accepts 1 parameter cols
(defaults to 3) which represents the number of columns you want to render in the menu. Go to MainMenu
component to customize the sizes if required.
You can trigger menu on hover or click (default).
To trigger menu on hover instead, set the prop disable-hover-trigger
to false
on NavigationMenu
component.
For addtional customization, visit the offical (docs)[https://www.radix-vue.com/components/navigation-menu.html#root]
:data-active="route().current('blog.*') ? true : undefined"
to the NavigationMenuLink
component.
By default, NavigationMenuLink
renders a
tag. To use the Inertia routing, you should define :as="Link"
attribute.
For external links, just add target="_blank"
attribute.
route().current()
is a helper function where you can determine current route by checking the exact route name (for example blog.index
) or route name expressions (for example blog.*
where all routes starting with blog.
will return true).
To style, go to resources/js/Components/ui/navigation-menu/index.ts
and use data-[active]:
class selector to customize the active states.
To define active state of inner page links (the ones inside menus), define the active state rule.
resources/js/Components/NavigationMenuListItem.vue
and update the class under route().current(item.active)
condition.