{% extends 'base.html.twig' %} {% block title %}Nav Item - Design System - Bubul{% endblock %} {% block body %}
Molécules /

Nav Item

Élément de navigation sidebar

{# ===== USAGE ===== #}

Usage

{% verbatim %}{% include '_molecules/nav-item/nav-item.html.twig' with {
    label: 'Dashboard',
    icon: 'home',
    href: '/dashboard',
    active: true
} %}{% endverbatim %}
{# ===== ÉTATS ===== #}

États

{# Simulation sidebar avec fond gradient comme l'ancien design #}
{% include '_molecules/nav-item/nav-item.html.twig' with { label: 'Dashboard', icon: 'bubul-dashboard', href: '#', active: true } %} {% include '_molecules/nav-item/nav-item.html.twig' with { label: 'Moodia', icon: 'bubul-moodia', href: '#' } %} {% include '_molecules/nav-item/nav-item.html.twig' with { label: 'Serenia', icon: 'bubul-serenia', href: '#', badge: '3' } %} {% include '_molecules/nav-item/nav-item.html.twig' with { label: 'Slidia', icon: 'bubul-slidia', href: '#' } %} {% include '_molecules/nav-item/nav-item.html.twig' with { label: 'SAM', icon: 'bubul-sam', href: '#', disabled: true } %}
{# ===== SECTION ADMIN ===== #}

Section Administration

{# Séparateur #}
{# Catégorie #}
Administration
{# Items admin #}
{% include '_molecules/nav-item/nav-item.html.twig' with { label: 'Entreprises', icon: 'bubul-entreprise', href: '#' } %} {% include '_molecules/nav-item/nav-item.html.twig' with { label: 'Utilisateurs', icon: 'bubul-utilisateur', href: '#' } %} {% include '_molecules/nav-item/nav-item.html.twig' with { label: 'Contrats', icon: 'bubul-contrat', href: '#', active: true } %}
{# ===== ÉTAT VERROUILLÉ ===== #}

État verrouillé

Paramètre : locked — Affiche un cadenas rouge

{% include '_molecules/nav-item/nav-item.html.twig' with { label: 'Dashboard', icon: 'bubul-dashboard', href: '#', active: true } %} {% include '_molecules/nav-item/nav-item.html.twig' with { label: 'Moodia', icon: 'bubul-moodia', href: '#' } %} {% include '_molecules/nav-item/nav-item.html.twig' with { label: 'Serenia', icon: 'bubul-serenia', href: '#', locked: true } %} {% include '_molecules/nav-item/nav-item.html.twig' with { label: 'Slidia', icon: 'bubul-slidia', href: '#', locked: true } %} {% include '_molecules/nav-item/nav-item.html.twig' with { label: 'SAM', icon: 'bubul-sam', href: '#', locked: true, disabled: true } %}
{# ===== MODE COLLAPSED ===== #}

Mode collapsed

{% include '_molecules/nav-item/nav-item.html.twig' with { label: 'Dashboard', icon: 'bubul-dashboard', href: '#', collapsed: true, active: true } %} {% include '_molecules/nav-item/nav-item.html.twig' with { label: 'Moodia', icon: 'bubul-moodia', href: '#', collapsed: true } %} {% include '_molecules/nav-item/nav-item.html.twig' with { label: 'Serenia', icon: 'bubul-serenia', href: '#', collapsed: true, badge: '3' } %} {% include '_molecules/nav-item/nav-item.html.twig' with { label: 'Slidia', icon: 'bubul-slidia', href: '#', collapsed: true, locked: true } %}
{# ===== VARIANTES ===== #}

Variantes

{# Default #}

Default

{% include '_molecules/nav-item/nav-item.html.twig' with { label: 'Normal', icon: 'home', href: '#', variant: 'default' } %} {% include '_molecules/nav-item/nav-item.html.twig' with { label: 'Actif', icon: 'home', href: '#', variant: 'default', active: true } %}
{# Primary #}

Primary

{% include '_molecules/nav-item/nav-item.html.twig' with { label: 'Normal', icon: 'home', href: '#', variant: 'primary' } %} {% include '_molecules/nav-item/nav-item.html.twig' with { label: 'Actif', icon: 'home', href: '#', variant: 'primary', active: true } %}
{# Minimal #}

Minimal

{% include '_molecules/nav-item/nav-item.html.twig' with { label: 'Normal', icon: 'home', href: '#', variant: 'minimal' } %} {% include '_molecules/nav-item/nav-item.html.twig' with { label: 'Actif', icon: 'home', href: '#', variant: 'minimal', active: true } %}
{# ===== PARAMÈTRES ===== #}

Paramètres

Paramètre Type Défaut Description
labelstring(requis)Texte du lien
hrefstring'#'URL de destination
iconstringnullNom de l'icône
badgestringnullTexte du badge (compteur)
activeboolfalseÉtat actif
collapsedboolfalseMode collapsed (icône seule)
lockedboolfalseAffiche un cadenas rouge (verrouillé)
variantstringdefaultdefault, primary, minimal
sizestringmdsm, md, lg
externalboolfalseLien externe (nouvelle fenêtre)
disabledboolfalseÉtat désactivé
{% endblock %}