Steps

Use this to showcase sequential instructions in your project with highlighted code snippets and copy code functionality.

1

Title

Description

Your code
2

Highlight Code

Highlighting specific lines in your code

import React from 'react';
import Component from './components/ComponentName';
function App() {
return (
<div>
<Component/>
</div>
);
}
export default App;
Installation
npx @ayushmxxn/serenity-ui@latest add steps
Usage
import Steps from './components/ui/Steps';

const steps = [
  {
    title: "Title",
    description: "Description",
    code: "Your code",
  },
  {
    title: "Highlight Code",
    description: "Highlighting specific lines in your code",
    code: `/\$import React from 'react';
import Component from './components/ComponentName';

function App() {
  return (
    <div>
      <Component/>
    </div>
  );
}

export default App;/`,
    highlightLines: [1,6],
  },
];

function Page() {
  return (
    <div>
      <Steps steps={steps} />
    </div>
  )
}

export default Page;

Props

Prop NameTypeDescription
titlestringTitle of the step
descriptionstringDescription of the step
codestringCode of the step
highlightLinesnumber[]Line numbers you want to highlight in your code
Built byAyushmaan Singh. The source code is available onGithub