rsnext/examples/active-class-name
zhafri-shafiq 74c349daab
Add prop-types in package.json (#28481)
## Bug

- Related issues #28480 

This is just minor dependency fix that I noticed while going through the examples.
2021-08-25 12:53:50 +00:00
..
components updated active-class-name example to also demo a [slug] path (#15924) 2020-08-06 01:26:48 +00:00
pages updated active-class-name example to also demo a [slug] path (#15924) 2020-08-06 01:26:48 +00:00
.gitignore Added .gitignore to examples that are deployed to vercel (#15127) 2020-07-16 10:52:23 -04:00
package.json Add prop-types in package.json (#28481) 2021-08-25 12:53:50 +00:00
README.md docs: add 'Open in StackBlitz' buttons to various examples (#25853) 2021-06-08 20:45:02 +00:00

activeClassName example

ReactRouter has a convenience property on the Link element to allow an author to set the active className on a link. This example replicates that functionality using Next's own Link.

Preview

Preview the example live on StackBlitz:

Open in StackBlitz

Deploy your own

Deploy the example using Vercel:

Deploy with Vercel

How to use

Execute create-next-app with npm or Yarn to bootstrap the example:

npx create-next-app --example active-class-name active-class-name-app
# or
yarn create next-app --example active-class-name active-class-name-app

Deploy it to the cloud with Vercel (Documentation).