Breadcrumb

less than 1 minute read

References

TypeScript

import { Components } from "gd-sprest-bs";

// Create the breadcrumb
let el = document.querySelector("#breadcrumb");
let breadcrumb = Components.Breadcrumb({
    el: el,
    items: [
        { text: "Root", href: "/" },
        { text: "Web 1", href: "/web" },
        { text: "Web 1-1", href: "/web/1" }
    ]
});

React

import * as React from "react";
import { Breadcrumb } from "gd-sprest-bsx";

export class IDemo extends React.Component {
    // Render the component
    render() {
        return (
            <Breadcrumb
                items={[
                    { text: "Root", href: "/" },
                    { text: "Web 1", href: "/web" },
                    { text: "Web 1-1", href: "/web/1" },
                ]}
            />
        );
    }
}

Code Playground