How to use react-slugify - 4 common examples

To help you get started, we’ve selected a few react-slugify examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github melikpehlivanov / AuctionSystem / src / Presentation / SpaWeb / src / utils / helpers / slug.js View on Github external
export const itemDetailsSlug = (title, id) => {
  return `/items/${slugify(title)}/${id}`;
};
github tinacms / tina-starter-grande / src / blocks / form.js View on Github external
{form.fields.map(field => {
        if (field.inputType === "textarea") {
          return (
            
              <label for="{slugify(field.label)}">{field.label}</label>
              <textarea id="{slugify(field.label)}" name="{slugify(field.label)}" rows="5" cols="40"></textarea>
            
          )
        } else {
          return (
            
              <label for="{slugify(field.label)}">{field.label}</label>
github tinacms / tina-starter-grande / src / components / siteLayout.js View on Github external
filename(form) {
    let slug = slugify(form.title.toLowerCase())
    return `content/posts/${slug}.md`
  },
  frontmatter(form) {
github contentz-tech / contentz / src / components / html / heading.js View on Github external
exports.H4 = props =>
  jsx("h4", {
    css: {
      fontSize: "1.5em",
      fontWeight: "normal",
      margin: "1em 0 0.25em"
    },
    id: slugify(jsx("h4", props)),
    ...props
  });

react-slugify

Slugify a React node

MIT
Latest version published 3 months ago

Package Health Score

59 / 100
Full package analysis

Popular react-slugify functions