Marigold
Getting StartedFoundationsComponentsPatternsRecipesReleases
Discover new Tutorials!

Components

Overview

Application

MarigoldProvider
updated
RouterProvider
updated

Layout

Aside
Aspect
Breakout
Center
Columns
Container
Grid
Inline
Inset
Scrollable
Split
Stack
updated
Tiles

Form

Autocomplete
Button
updated
Calendar
Checkbox
ComboBox
DateField
DatePicker
Form
Multiselect
new
NumberField
Radio
SearchField
Select
Slider
Switch
TextArea
TextField
TimeField
new

Collection

SelectList
updated
Table
updated
Tag

Navigation

Accordion
Breadcrumbs
beta
Pagination
Tabs

Overlay

ContextualHelp
new
Dialog
Menu
Toast
beta
Tooltip
updated

Content

Badge
Body
Card
Divider
updated
Footer
Header
Headline
updated
Icon
updated
Image
Link
updated
List
updated
SectionMessage
SVG
updated
Text
updated
VisuallyHidden
updated
XLoader

Formatters

DateFormat
NumericFormat

Hooks and Utils

cn
cva
extendTheme
useAsyncListData
useListData
useResponsiveValue
useTheme

RouterProvider

Provider for easier handling routing.

The <RouterProvider> is a component from react-aria-components which we expose to give you something on the hand to handle your routes in your application.

Usage

The <RouterProvider> is a context provider that integrates React Aria's navigation system with your router (like React Router, Next.js, or custom routing). It enables accessibility-aware navigation by informing components (like <Link> and useRouter) about the current location and navigation methods.

React Router

You can use the provider with the useNavigate hook from react-router-dom. The outcome from the function you can pass into the navigate prop from the <RouterProvider>.

If you want to read more about it visit react arias documentation about it here.

Next.js

Similar to React Router you can pass in the navigate prop the routes you get from the useRouter hook.

Also for more information please visit react arias documentation about it here.

Props

Did you know? You can explore, test, and customize props live in Marigold's storybook. Watch the effects they have in real-time!
View RouterProvider stories
children
ReactNode;
navigate
(path: string, routerOptions: undefined) => void
useHref?
(href: string) => string;
Last update: a month ago
Build with 🥵, 🧡 and
v14.1.1