Community forum for knowledge and support

Updated 4 months ago

Relume-ui Components Setup for NextJs App Router

At a glance

The community member is looking to use the Relume-ui library in a Next.js project that uses the app-router setup. They have two questions: 1) Are Relume-ui components set up to be "use client" components by default? 2) Or do they need to wrap the Relume-ui components by hand with "use client"? The community member provides an example of how they would wrap a Relume-ui Button component. There are no comments with an explicitly marked answer.

Relume-ui + NextJs App router / Server component question.
Im looking into Relume-ui to use it in a Next.Js project, while using the app-router setup.
Questions:
Are relume-ui components set up to be "use client" components by default? Or am i going to have to wrap the relume-ui components by hand? like:

"use client";

import { Button as RButton, ButtonProps } from '@relume_io/relume-ui';

const Button = (props: ButtonProps) => {
	const handelClick = () => console.log('do some action')
	return <RButton onClick={handelClick}>Click me</RButton>
}

export default Button;

Add a reply
Sign up and join the conversation on Slack