ናብ ቀንዲ ትሕዝቶ ዘልል ናብ docs navigation ዘልል
Check
in English

ድሮፕዳውንድስ

ዝርዝር መላግቦታትን ካልእን ንምርኣይ ብBotstrap ንቑልቁል ዝወርድ ፕላግ-ኢን ንዓውደ-ጽሑፋዊ ምድብላቕ ምቕያር።

ሓፈሻዊ ትሕዝቶ

ንቑልቁል ዝወርድ ዝርዝር መላግቦታትን ካልእን ንምርኣይ ዝሕግዙ ተለዋወጥቲ ዝኾኑ፣ ዓውደ-ጽሑፋዊ ምድብላቕ እዮም። በቲ ዝተሓወሶ ቡትስትራፕ ንቑልቁል ዝወርድ ጃቫስክሪፕት ፕላግ-ኢን መስተጋብራዊ ይኾኑ። ብምጥዋቕ እምበር ብምንሳሕ ኣይኮኑን ዝቕየሩ፤ እዚ ኮነ ኢልካ ዝተገብረ ውሳነ ዲዛይን ’ ዩ ።

ድሮፕዳውንስ ኣብ ሳልሳይ ወገን ቤተ-መጻሕፍቲ ዝተሃንጹ ኮይኖም ፡ ፖፐር ፡ ዳይናሚክ ኣቀማምጣን ቪውፖርት ምልላይን ይህብ። ቅድሚ ናይ Bootstrap ጃቫስክሪፕት popper.min.js ምእታውኩም ኣረጋግጹ ወይ ድማ Popper ዝሓዘ bootstrap.bundle.min.js/ ተጠቐሙ። bootstrap.bundle.jsፖፐር ዳይናሚክ ኣቀማምጣ ስለዘየድሊ ግን ኣብ navbars ንዝወድቁ ቦታታት ንምቕማጥ ኣይጥቀመሉን እዩ።

ተበጻሕነት

እቲ WAI ARIA ደረጃ ንሓደ ጭቡጥ role="menu"ዊጀት ይገልጽ , እዚ ግን ንተግባራት ወይ ተግባራት ዝቐስቅሱ መተግበሪ ዝመስሉ ምልክታታት ፍሉይ እዩ። ናይ ARIA ምልክታታት ናይ ምልክት ዝርዝር ነገራት፣ ናይ ምልክት ሳጹን ዝርዝር ነገራት፣ ናይ ሬድዮ መጠወቒ ዝርዝር ነገራት፣ ናይ ሬድዮ መጠወቒ ጉጅለታትን ንኡሳን ምልክታታትን ጥራይ ክሕዙ ይኽእሉ።

ብኣንጻሩ ናይ ቡትስትራፕ ድሮፕዳውንድስ ሓፈሻዊን ንዝተፈላለየ ኩነታትን ማርካፕ ቅርጽታትን ዝምልከትን ክኾኑ ዝተዳለዉ እዮም። ንኣብነት ተወሳኺ እታዎታትን ቁጽጽር ቅጥዕን ዝሓዙ ንቑልቁል ዝወርድ ንቑልቁል ዝወርድ ነገራት ምፍጣር ይከኣል እዩ፣ ከም ናይ ምድላይ ዓውድታት ወይ ናይ መእተዊ ቅጥዕታት። በዚ ምኽንያት እዚ፡ ቡትስትራፕ ንሓቀኛታት ARIA ምልክታታት ዘድልዩ roleዝኾነን ባህርያትን ኣይጽበን (ወይ ብኣውቶማቲክ ኣይውስኽን) ። ጸሓፍቲ ነዞም ​​ዝያዳ ፍሉያት ባህርያት ባዕሎም ከካትትዎም ክግደዱ እዮም።aria-

ይኹን እምበር፡ ቡትስትራፕ ንመብዛሕትኦም መደበኛ ናይ ሰሌዳ ቁልፊ ምልክት ምትእስሳር ኣብ ውሽጢ ዝተሃንጸ ደገፍ ይውስኽ እዩ፡ ከም ናይ .dropdown-itemመመልከቲ መፍትሕታት ተጠቒምካ ብውልቀ ባእታታት ናይ ምዝዋርን ነቲ ዝርዝር ESCብመፍትሕ ምዕጻውን ዓቕሚ።

ኣብነታት

ናይቲ ንቑልቁል ዝወርድ ቶግለር (ናትካ መጠወቒ ወይ መላግቦ) ከምኡውን ነቲ ንቑልቁል ዝወርድ ዝርዝር ኣብ ውሽጢ .dropdown፣ ወይ ካልእ ን ዝእውጅ ባእታ ጠቕልሎ position: relative;። ድሮፕዳውንድ ካብ <a>ወይ <button>ባእታታት ክብገሱ ይኽእሉ እዮም ብዝበለጸ ምስ ክህልዉኻ ዝኽእሉ ድሌታት ክሰማምዑ። ኣብዚ ዝተርኣዩ ኣብነታት <ul>ኣድላዪ ኣብ ዝኾነሉ ትርጉማዊ ባእታታት ይጥቀሙ፣ ግን ብሕታዊ ምልክት ምግባር ይድገፍ።

ንጽል መጠወቒ

ዝኾነ ንጽል .btnምስ ገለ ናይ ምልክት ለውጢ ናብ ንቑልቁል ዝወርድ ቶግል ክቕየር ይኽእል። <button>ብኽልቲኡ ባእታታት ብኸመይ ክትሰርሖም ከም እትኽእል ኣብዚ ኣሎ ፤

html ዝብል ጽሑፍ ኣሎ።
<div class="dropdown">
  <button class="btn btn-secondary dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
    Dropdown button
  </button>
  <ul class="dropdown-menu">
    <li><a class="dropdown-item" href="#">Action</a></li>
    <li><a class="dropdown-item" href="#">Another action</a></li>
    <li><a class="dropdown-item" href="#">Something else here</a></li>
  </ul>
</div>

ምስ <a>ባእታታት ድማ፤

html ዝብል ጽሑፍ ኣሎ።
<div class="dropdown">
  <a class="btn btn-secondary dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">
    Dropdown link
  </a>

  <ul class="dropdown-menu">
    <li><a class="dropdown-item" href="#">Action</a></li>
    <li><a class="dropdown-item" href="#">Another action</a></li>
    <li><a class="dropdown-item" href="#">Something else here</a></li>
  </ul>
</div>

እቲ ዝበለጸ ክፋል እዚ ምስ ዝኾነ ናይ መጠወቒ ፍልልይ ክትገብር ትኽእል ኢኻ፣ ንስኻ እውን፤

<!-- Example single danger button -->
<div class="btn-group">
  <button type="button" class="btn btn-danger dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
    Action
  </button>
  <ul class="dropdown-menu">
    <li><a class="dropdown-item" href="#">Action</a></li>
    <li><a class="dropdown-item" href="#">Another action</a></li>
    <li><a class="dropdown-item" href="#">Something else here</a></li>
    <li><hr class="dropdown-divider"></li>
    <li><a class="dropdown-item" href="#">Separated link</a></li>
  </ul>
</div>

ምፍንጫል ዝብል መጠወቒ

ብተመሳሳሊ፡ ዳርጋ ከም ሓደ መጠወቒ ንቑልቁል ዝወርድ ምልክት ዘለዎም ዝተመቕሉ መጠወቒታት ንቑልቁል ዝወርዱ ፍጠር፡ ግን ከኣ .dropdown-toggle-splitኣብ ዙርያ እቲ ንቑልቁል ዝወርድ ካሬት ግቡእ ርሕቀት ንምርካብ ብምውሳኽ።

ነዚ ተወሳኺ ክፍሊ ንጥቀመሉ paddingኣብ ክልቲኡ ወገን ናይቲ ካሬት ዘሎ ኣግማድ ብ25% ንምንካይን ነቲ margin-leftንስሩዕ መጠወቒ ምውራድ ዝተወሰኸ ንምእላይን። እቶም ተወሳኺ ለውጥታት ነቲ ካሬት ኣብቲ ዝተመቕለ መጠወቒ ማእከል ገይሩ ይገብርዎን ኣብ ጎኒ እቲ ቀንዲ መጠወቒ ዝያዳ ዝምጥን ዓቐን ዘለዎ ናይ ምውቃዕ ቦታ ይህቡን።

<!-- Example split danger button -->
<div class="btn-group">
  <button type="button" class="btn btn-danger">Action</button>
  <button type="button" class="btn btn-danger dropdown-toggle dropdown-toggle-split" data-bs-toggle="dropdown" aria-expanded="false">
    <span class="visually-hidden">Toggle Dropdown</span>
  </button>
  <ul class="dropdown-menu">
    <li><a class="dropdown-item" href="#">Action</a></li>
    <li><a class="dropdown-item" href="#">Another action</a></li>
    <li><a class="dropdown-item" href="#">Something else here</a></li>
    <li><hr class="dropdown-divider"></li>
    <li><a class="dropdown-item" href="#">Separated link</a></li>
  </ul>
</div>

ሳይዚንግ ምግባር

ንቑልቁል ዝወርድ መጠወቒታት ምስ ኩሉ ዓቐን ዘለዎም መጠወቒታት ይሰርሑ፣ ነባሪን ዝተመቕሉን ንቑልቁል ዝወርድ መጠወቒታት ሓዊስካ።

<!-- Large button groups (default and split) -->
<div class="btn-group">
  <button class="btn btn-secondary btn-lg dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
    Large button
  </button>
  <ul class="dropdown-menu">
    ...
  </ul>
</div>
<div class="btn-group">
  <button class="btn btn-secondary btn-lg" type="button">
    Large split button
  </button>
  <button type="button" class="btn btn-lg btn-secondary dropdown-toggle dropdown-toggle-split" data-bs-toggle="dropdown" aria-expanded="false">
    <span class="visually-hidden">Toggle Dropdown</span>
  </button>
  <ul class="dropdown-menu">
    ...
  </ul>
</div>
<div class="btn-group">
  <button class="btn btn-secondary btn-sm dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
    Small button
  </button>
  <ul class="dropdown-menu">
    ...
  </ul>
</div>
<div class="btn-group">
  <button class="btn btn-secondary btn-sm" type="button">
    Small split button
  </button>
  <button type="button" class="btn btn-sm btn-secondary dropdown-toggle dropdown-toggle-split" data-bs-toggle="dropdown" aria-expanded="false">
    <span class="visually-hidden">Toggle Dropdown</span>
  </button>
  <ul class="dropdown-menu">
    ...
  </ul>
</div>

ጸሊም ንጣብ ንጣብ

ኣብ ልዕሊ ዝጸልመተ ናቭባር ወይ ብሕታዊ ቅዲ ንምስምማዕ ኣብ ዝጸልመተ ንቑልቁል ዝወርድ ምረጽ ኣብ .dropdown-menu-darkልዕሊ ዝጸንሐ ብምውሳኽ .dropdown-menu። ኣብቲ ንቑልቁል ዝወርድ ነገራት ዝኾነ ለውጢ ኣየድልን።

html ዝብል ጽሑፍ ኣሎ።
<div class="dropdown">
  <button class="btn btn-secondary dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
    Dropdown button
  </button>
  <ul class="dropdown-menu dropdown-menu-dark">
    <li><a class="dropdown-item active" href="#">Action</a></li>
    <li><a class="dropdown-item" href="#">Another action</a></li>
    <li><a class="dropdown-item" href="#">Something else here</a></li>
    <li><hr class="dropdown-divider"></li>
    <li><a class="dropdown-item" href="#">Separated link</a></li>
  </ul>
</div>

ከምኡ’ውን ኣብ ናቭባር ንጥቀመሉ ምቕማጥ፤

html ዝብል ጽሑፍ ኣሎ።
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
  <div class="container-fluid">
    <a class="navbar-brand" href="#">Navbar</a>
    <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNavDarkDropdown" aria-controls="navbarNavDarkDropdown" aria-expanded="false" aria-label="Toggle navigation">
      <span class="navbar-toggler-icon"></span>
    </button>
    <div class="collapse navbar-collapse" id="navbarNavDarkDropdown">
      <ul class="navbar-nav">
        <li class="nav-item dropdown">
          <a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">
            Dropdown
          </a>
          <ul class="dropdown-menu dropdown-menu-dark">
            <li><a class="dropdown-item" href="#">Action</a></li>
            <li><a class="dropdown-item" href="#">Another action</a></li>
            <li><a class="dropdown-item" href="#">Something else here</a></li>
          </ul>
        </li>
      </ul>
    </div>
  </div>
</nav>

ኣንፈታት

RTL

ኣብ RTL Bootstrap ክትጥቀም ከለኻ ኣንፈታት ይንጸባረቑ፣ ማለት .dropstartኣብ የማናይ ሸነኽ ክረአ እዩ።

ማእከል ዝገበረ

ነቲ ንቑልቁል ዝወርድ ዝርዝር ኣብ ትሕቲ እቲ toggle with .dropdown-centerኣብ ልዕሊ ወላዲ ባእታ ማእከል ዝገበረ ግበሮ።

html ዝብል ጽሑፍ ኣሎ።
<div class="dropdown-center">
  <button class="btn btn-secondary dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
    Centered dropdown
  </button>
  <ul class="dropdown-menu">
    <li><a class="dropdown-item" href="#">Action</a></li>
    <li><a class="dropdown-item" href="#">Action two</a></li>
    <li><a class="dropdown-item" href="#">Action three</a></li>
  </ul>
</div>

ድሮፕኣፕ

.dropupኣብ ልዕሊ ባእታታት ንዘለዉ ንቑልቁል ዝወርድ ምልክታታት ኣብቲ ወላዲ ባእታ ብምውሳኽ ኣበግስ።

<!-- Default dropup button -->
<div class="btn-group dropup">
  <button type="button" class="btn btn-secondary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
    Dropup
  </button>
  <ul class="dropdown-menu">
    <!-- Dropdown menu links -->
  </ul>
</div>

<!-- Split dropup button -->
<div class="btn-group dropup">
  <button type="button" class="btn btn-secondary">
    Split dropup
  </button>
  <button type="button" class="btn btn-secondary dropdown-toggle dropdown-toggle-split" data-bs-toggle="dropdown" aria-expanded="false">
    <span class="visually-hidden">Toggle Dropdown</span>
  </button>
  <ul class="dropdown-menu">
    <!-- Dropdown menu links -->
  </ul>
</div>

ድሮፕኣፕ ማእከል ዝገበረ

ነቲ ንቑልቁል ዝወርድ ዝርዝር ኣብ ልዕሊ እቲ toggle with .dropup-centerኣብ ልዕሊ ወላዲ ባእታ ማእከል ዝገበረ ግበሮ።

html ዝብል ጽሑፍ ኣሎ።
<div class="dropup-center dropup">
  <button class="btn btn-secondary dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
    Centered dropup
  </button>
  <ul class="dropdown-menu">
    <li><a class="dropdown-item" href="#">Action</a></li>
    <li><a class="dropdown-item" href="#">Action two</a></li>
    <li><a class="dropdown-item" href="#">Action three</a></li>
  </ul>
</div>

ድሮፕፐንድ

.dropendኣብቲ ወላዲ ባእታ ብምውሳኽ ኣብ የማናይ ሸነኽ ናይቶም ባእታታት ዝርከቡ ንቑልቁል ዝወርድ ምልክታታት ኣበግስ ።

<!-- Default dropend button -->
<div class="btn-group dropend">
  <button type="button" class="btn btn-secondary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
    Dropend
  </button>
  <ul class="dropdown-menu">
    <!-- Dropdown menu links -->
  </ul>
</div>

<!-- Split dropend button -->
<div class="btn-group dropend">
  <button type="button" class="btn btn-secondary">
    Split dropend
  </button>
  <button type="button" class="btn btn-secondary dropdown-toggle dropdown-toggle-split" data-bs-toggle="dropdown" aria-expanded="false">
    <span class="visually-hidden">Toggle Dropend</span>
  </button>
  <ul class="dropdown-menu">
    <!-- Dropdown menu links -->
  </ul>
</div>

ድሮፕስታርት

.dropstartኣብቲ ወላዲ ባእታ ብምውሳኽ ኣብ ጸጋማይ ሸነኽ ናይቶም ባእታታት ዝርከቡ ንቑልቁል ዝወርድ ምልክታታት ጀምር ።

<!-- Default dropstart button -->
<div class="btn-group dropstart">
  <button type="button" class="btn btn-secondary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
    Dropstart
  </button>
  <ul class="dropdown-menu">
    <!-- Dropdown menu links -->
  </ul>
</div>

<!-- Split dropstart button -->
<div class="btn-group dropstart">
  <button type="button" class="btn btn-secondary dropdown-toggle dropdown-toggle-split" data-bs-toggle="dropdown" aria-expanded="false">
    <span class="visually-hidden">Toggle Dropstart</span>
  </button>
  <ul class="dropdown-menu">
    <!-- Dropdown menu links -->
  </ul>
  <button type="button" class="btn btn-secondary">
    Split dropstart
  </button>
</div>

<a>ወይ <button>ባእታታት ከም ንቑልቁል ዝወርድ ነገራት ክትጥቀመሉ ትኽእል ኢኻ ።

html ዝብል ጽሑፍ ኣሎ።
<div class="dropdown">
  <button class="btn btn-secondary dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
    Dropdown
  </button>
  <ul class="dropdown-menu">
    <li><button class="dropdown-item" type="button">Action</button></li>
    <li><button class="dropdown-item" type="button">Another action</button></li>
    <li><button class="dropdown-item" type="button">Something else here</button></li>
  </ul>
</div>

ብተወሳኺ ብዘይ መስተጋብራዊ ንቑልቁል ዝወርድ ነገራት ብ .dropdown-item-text. ብብሕታዊ CSS ወይ ጽሑፍ ዩቲሊቲታት ዝያዳ ቅዲ ክትገብሩ ናጻ ትኾኑ።

html ዝብል ጽሑፍ ኣሎ።
<ul class="dropdown-menu">
  <li><span class="dropdown-item-text">Dropdown item text</span></li>
  <li><a class="dropdown-item" href="#">Action</a></li>
  <li><a class="dropdown-item" href="#">Another action</a></li>
  <li><a class="dropdown-item" href="#">Something else here</a></li>
</ul>

ንቑሕ

.activeኣብቲ ንቑልቁል ዝወርድ ነገራት ከም ንጡፍ ቅዲ ንምግባር ወስኸሎም ። ነቲ ንጡፍ ኩነታት ናብ ሓገዝቲ ቴክኖሎጂታት ንምትሕልላፍ፡ ነቲ aria-currentባህሪ ተጠቐም — ነቲ pageዋጋ ናይቲ ህሉው ገጽ ብምጥቃም፡ ወይ trueንህሉው ኣቕሓ ኣብ ሓደ ስብስብ።

html ዝብል ጽሑፍ ኣሎ።
<ul class="dropdown-menu">
  <li><a class="dropdown-item" href="#">Regular link</a></li>
  <li><a class="dropdown-item active" href="#" aria-current="true">Active link</a></li>
  <li><a class="dropdown-item" href="#">Another link</a></li>
</ul>

ስንኩል

.disabledኣብቲ ንቑልቁል ዝወርድ ነገራት ከም ዝተሰናኸሉ ቅዲ ንምግባር ወስኸሎም ።

html ዝብል ጽሑፍ ኣሎ።
<ul class="dropdown-menu">
  <li><a class="dropdown-item" href="#">Regular link</a></li>
  <li><a class="dropdown-item disabled">Disabled link</a></li>
  <li><a class="dropdown-item" href="#">Another link</a></li>
</ul>

ብነባሪ መልክዑ፡ ሓደ ንቑልቁል ዝወርድ ዝርዝር ብኣውቶማቲክ ካብ ላዕሊን ብጸጋማይ ሸነኽ ወላዲኡን 100% ይቕመጥ። ነዚ ብኣንፈታዊ .drop*ክፍልታት ክትቅይሮ ትኽእል ኢኻ፣ ግን ብተወሳኺ መቐየሪ ክፍልታት እውን ክትቆጻጸሮም ትኽእል ኢኻ።

.dropdown-menu-endናብ a ወስኹ ናብ .dropdown-menuየማን ነቲ ንቑልቁል ዝወርድ ዝርዝር ኣሰላልፍዎ። ኣብ RTL Bootstrap ክትጥቀም ከለኻ ኣንፈታት ይንጸባረቕ፣ ማለት .dropdown-menu-endኣብ ጸጋማይ ሸነኽ ክረአ እዩ።

ርእሲ ንላዕሊ! ድሮፕዳውንስ ሳላ ፖፐር ብዘይካ ኣብ ናቭባር ክሕዙ ከለዉ ይቕመጡ።
html ዝብል ጽሑፍ ኣሎ።
<div class="btn-group">
  <button type="button" class="btn btn-secondary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
    Right-aligned menu example
  </button>
  <ul class="dropdown-menu dropdown-menu-end">
    <li><button class="dropdown-item" type="button">Action</button></li>
    <li><button class="dropdown-item" type="button">Another action</button></li>
    <li><button class="dropdown-item" type="button">Something else here</button></li>
  </ul>
</div>

ምላሽ ዝህብ ኣሰላልፋ

ምላሽ ዝህብ ኣሰላልፋ ክትጥቀም እንተደሊኻ፡ ነቲ data-bs-display="static"ባህሪ ብምውሳኽ ዳይናሚክ ኣቀማምጣ ኣሰናኽልን ነቶም ምላሽ ዝህቡ ናይ ለውጢ ክፍልታት ተጠቐምን።

ነቲ ንቑልቁል ዝወርድ ዝርዝር ምስቲ ዝተዋህበ ነጥቢ ምብታኽ ወይ ካብኡ ዝዓቢ ንየማን ንምስምማዕ ፡ ወስኸሉ .dropdown-menu{-sm|-md|-lg|-xl|-xxl}-end

html ዝብል ጽሑፍ ኣሎ።
<div class="btn-group">
  <button type="button" class="btn btn-secondary dropdown-toggle" data-bs-toggle="dropdown" data-bs-display="static" aria-expanded="false">
    Left-aligned but right aligned when large screen
  </button>
  <ul class="dropdown-menu dropdown-menu-lg-end">
    <li><button class="dropdown-item" type="button">Action</button></li>
    <li><button class="dropdown-item" type="button">Another action</button></li>
    <li><button class="dropdown-item" type="button">Something else here</button></li>
  </ul>
</div>

ንጸጋም ነቲ ንቑልቁል ዝወርድ ዝርዝር ምስቲ ዝተዋህበ ነጥቢ ምብታኽ ወይ ካብኡ ዝዓቢ ንምስምማዕ .dropdown-menu-end፡ ወስኸሉን .dropdown-menu{-sm|-md|-lg|-xl|-xxl}-start

html ዝብል ጽሑፍ ኣሎ።
<div class="btn-group">
  <button type="button" class="btn btn-secondary dropdown-toggle" data-bs-toggle="dropdown" data-bs-display="static" aria-expanded="false">
    Right-aligned but left aligned when large screen
  </button>
  <ul class="dropdown-menu dropdown-menu-end dropdown-menu-lg-start">
    <li><button class="dropdown-item" type="button">Action</button></li>
    <li><button class="dropdown-item" type="button">Another action</button></li>
    <li><button class="dropdown-item" type="button">Something else here</button></li>
  </ul>
</div>

data-bs-display="static"ፖፐር ኣብ navbars ስለዘይጥቀም፡ ኣብ navbars ንዝርከቡ ንቑልቁል ዝወርድ መጠወቒታት ባህሪ ምውሳኽ ከምዘየድልየካ ኣስተውዕል።

ናይ ኣሰላልፋ ኣማራጺታት

መብዛሕትኦም ኣብ ላዕሊ ዝተገልጹ ኣማራጺታት ብምውሳድ፡ ኣብዚ ንእሽቶ ናይ ክሽነ መሕጸቢ ዲሞ ናይ ዝተፈላለዩ ንቑልቁል ዝወርድ ኣሰላልፋ ኣማራጺታት ኣብ ሓደ ቦታ ኣሎ።

html ዝብል ጽሑፍ ኣሎ።
<div class="btn-group">
  <button class="btn btn-secondary dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
    Dropdown
  </button>
  <ul class="dropdown-menu">
    <li><a class="dropdown-item" href="#">Menu item</a></li>
    <li><a class="dropdown-item" href="#">Menu item</a></li>
    <li><a class="dropdown-item" href="#">Menu item</a></li>
  </ul>
</div>

<div class="btn-group">
  <button type="button" class="btn btn-secondary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
    Right-aligned menu
  </button>
  <ul class="dropdown-menu dropdown-menu-end">
    <li><a class="dropdown-item" href="#">Menu item</a></li>
    <li><a class="dropdown-item" href="#">Menu item</a></li>
    <li><a class="dropdown-item" href="#">Menu item</a></li>
  </ul>
</div>

<div class="btn-group">
  <button type="button" class="btn btn-secondary dropdown-toggle" data-bs-toggle="dropdown" data-bs-display="static" aria-expanded="false">
    Left-aligned, right-aligned lg
  </button>
  <ul class="dropdown-menu dropdown-menu-lg-end">
    <li><a class="dropdown-item" href="#">Menu item</a></li>
    <li><a class="dropdown-item" href="#">Menu item</a></li>
    <li><a class="dropdown-item" href="#">Menu item</a></li>
  </ul>
</div>

<div class="btn-group">
  <button type="button" class="btn btn-secondary dropdown-toggle" data-bs-toggle="dropdown" data-bs-display="static" aria-expanded="false">
    Right-aligned, left-aligned lg
  </button>
  <ul class="dropdown-menu dropdown-menu-end dropdown-menu-lg-start">
    <li><a class="dropdown-item" href="#">Menu item</a></li>
    <li><a class="dropdown-item" href="#">Menu item</a></li>
    <li><a class="dropdown-item" href="#">Menu item</a></li>
  </ul>
</div>

<div class="btn-group dropstart">
  <button type="button" class="btn btn-secondary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
    Dropstart
  </button>
  <ul class="dropdown-menu">
    <li><a class="dropdown-item" href="#">Menu item</a></li>
    <li><a class="dropdown-item" href="#">Menu item</a></li>
    <li><a class="dropdown-item" href="#">Menu item</a></li>
  </ul>
</div>

<div class="btn-group dropend">
  <button type="button" class="btn btn-secondary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
    Dropend
  </button>
  <ul class="dropdown-menu">
    <li><a class="dropdown-item" href="#">Menu item</a></li>
    <li><a class="dropdown-item" href="#">Menu item</a></li>
    <li><a class="dropdown-item" href="#">Menu item</a></li>
  </ul>
</div>

<div class="btn-group dropup">
  <button type="button" class="btn btn-secondary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
    Dropup
  </button>
  <ul class="dropdown-menu">
    <li><a class="dropdown-item" href="#">Menu item</a></li>
    <li><a class="dropdown-item" href="#">Menu item</a></li>
    <li><a class="dropdown-item" href="#">Menu item</a></li>
  </ul>
</div>

ኣርእስታት

ኣብ ዝኾነ ንቑልቁል ዝወርድ ዝርዝር ንክፋላት ተግባራት ስያመ ንምሃብ ርእሲ ምውሳኽ።

html ዝብል ጽሑፍ ኣሎ።
<ul class="dropdown-menu">
  <li><h6 class="dropdown-header">Dropdown header</h6></li>
  <li><a class="dropdown-item" href="#">Action</a></li>
  <li><a class="dropdown-item" href="#">Another action</a></li>
</ul>

መከፋፈልቲ

ንጉጅለታት ናይ ተዛመድቲ ናይ ምልክት ዝርዝር ነገራት ብመከፋፈልቲ ምፍላይ።

html ዝብል ጽሑፍ ኣሎ።
<ul class="dropdown-menu">
  <li><a class="dropdown-item" href="#">Action</a></li>
  <li><a class="dropdown-item" href="#">Another action</a></li>
  <li><a class="dropdown-item" href="#">Something else here</a></li>
  <li><hr class="dropdown-divider"></li>
  <li><a class="dropdown-item" href="#">Separated link</a></li>
</ul>

ጽሑፍ

ዝኾነ ነጻ ቅርጺ ጽሑፍ ኣብ ውሽጢ ንቑልቁል ዝወርድ ዝርዝር ምስ ጽሑፍ ኣቐምጦ እሞ ናይ ርሕቀት መሳለጥያታት ተጠቐም ። ስፍሓት ናይቲ ዝርዝር ንምድራት ተወሳኺ ቅዲታት ዓቐን ከድልየካ ምዃኑ ኣስተውዕል።

html ዝብል ጽሑፍ ኣሎ።
<div class="dropdown-menu p-4 text-muted" style="max-width: 200px;">
  <p>
    Some example text that's free-flowing within the dropdown menu.
  </p>
  <p class="mb-0">
    And this is more example text.
  </p>
</div>

ቅጥዕታት

ንሓደ ቅጥዒ ኣብ ውሽጢ ንቑልቁል ዝወርድ ዝርዝር ኣቐምጦ፣ ወይ ናብ ንቑልቁል ዝወርድ ዝርዝር ግበሮ፣ ከምኡውን ማርጅን ወይ ፓዲንግ ዩቲሊቲታት ተጠቐም እሞ እቲ እትደልዮ ኣሉታዊ ቦታ ሃቦ።

html ዝብል ጽሑፍ ኣሎ።
<div class="dropdown-menu">
  <form class="px-4 py-3">
    <div class="mb-3">
      <label for="exampleDropdownFormEmail1" class="form-label">Email address</label>
      <input type="email" class="form-control" id="exampleDropdownFormEmail1" placeholder="[email protected]">
    </div>
    <div class="mb-3">
      <label for="exampleDropdownFormPassword1" class="form-label">Password</label>
      <input type="password" class="form-control" id="exampleDropdownFormPassword1" placeholder="Password">
    </div>
    <div class="mb-3">
      <div class="form-check">
        <input type="checkbox" class="form-check-input" id="dropdownCheck">
        <label class="form-check-label" for="dropdownCheck">
          Remember me
        </label>
      </div>
    </div>
    <button type="submit" class="btn btn-primary">Sign in</button>
  </form>
  <div class="dropdown-divider"></div>
  <a class="dropdown-item" href="#">New around here? Sign up</a>
  <a class="dropdown-item" href="#">Forgot password?</a>
</div>
html ዝብል ጽሑፍ ኣሎ።
<div class="dropdown">
  <button type="button" class="btn btn-primary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false" data-bs-auto-close="outside">
    Dropdown form
  </button>
  <form class="dropdown-menu p-4">
    <div class="mb-3">
      <label for="exampleDropdownFormEmail2" class="form-label">Email address</label>
      <input type="email" class="form-control" id="exampleDropdownFormEmail2" placeholder="[email protected]">
    </div>
    <div class="mb-3">
      <label for="exampleDropdownFormPassword2" class="form-label">Password</label>
      <input type="password" class="form-control" id="exampleDropdownFormPassword2" placeholder="Password">
    </div>
    <div class="mb-3">
      <div class="form-check">
        <input type="checkbox" class="form-check-input" id="dropdownCheck2">
        <label class="form-check-label" for="dropdownCheck2">
          Remember me
        </label>
      </div>
    </div>
    <button type="submit" class="btn btn-primary">Sign in</button>
  </form>
</div>

ነቲ ንቑልቁል ዝወርድ ቦታ ንምቕያር data-bs-offsetወይ ተጠቐም ።data-bs-reference

html ዝብል ጽሑፍ ኣሎ።
<div class="d-flex">
  <div class="dropdown me-1">
    <button type="button" class="btn btn-secondary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false" data-bs-offset="10,20">
      Offset
    </button>
    <ul class="dropdown-menu">
      <li><a class="dropdown-item" href="#">Action</a></li>
      <li><a class="dropdown-item" href="#">Another action</a></li>
      <li><a class="dropdown-item" href="#">Something else here</a></li>
    </ul>
  </div>
  <div class="btn-group">
    <button type="button" class="btn btn-secondary">Reference</button>
    <button type="button" class="btn btn-secondary dropdown-toggle dropdown-toggle-split" data-bs-toggle="dropdown" aria-expanded="false" data-bs-reference="parent">
      <span class="visually-hidden">Toggle Dropdown</span>
    </button>
    <ul class="dropdown-menu">
      <li><a class="dropdown-item" href="#">Action</a></li>
      <li><a class="dropdown-item" href="#">Another action</a></li>
      <li><a class="dropdown-item" href="#">Something else here</a></li>
      <li><hr class="dropdown-divider"></li>
      <li><a class="dropdown-item" href="#">Separated link</a></li>
    </ul>
  </div>
</div>

ኣውቶ ምዕጻው ባህሪ

ብነባሪ መልክዑ፡ ኣብ ውሽጢ ወይ ወጻኢ ናይቲ ንቑልቁል ዝወርድ ዝርዝር ክትጥውቕ ከለኻ፡ እቲ ንቑልቁል ዝወርድ ዝርዝር ይዕጾ። autoCloseነዚ ባህሪ ናይቲ ንቑልቁል ዝወርድ ንምቕያር ነቲ ኣማራጺ ክትጥቀመሉ ትኽእል ኢኻ ።

html ዝብል ጽሑፍ ኣሎ።
<div class="btn-group">
  <button class="btn btn-secondary dropdown-toggle" type="button" data-bs-toggle="dropdown" data-bs-auto-close="true" aria-expanded="false">
    Default dropdown
  </button>
  <ul class="dropdown-menu">
    <li><a class="dropdown-item" href="#">Menu item</a></li>
    <li><a class="dropdown-item" href="#">Menu item</a></li>
    <li><a class="dropdown-item" href="#">Menu item</a></li>
  </ul>
</div>

<div class="btn-group">
  <button class="btn btn-secondary dropdown-toggle" type="button" data-bs-toggle="dropdown" data-bs-auto-close="inside" aria-expanded="false">
    Clickable outside
  </button>
  <ul class="dropdown-menu">
    <li><a class="dropdown-item" href="#">Menu item</a></li>
    <li><a class="dropdown-item" href="#">Menu item</a></li>
    <li><a class="dropdown-item" href="#">Menu item</a></li>
  </ul>
</div>

<div class="btn-group">
  <button class="btn btn-secondary dropdown-toggle" type="button" data-bs-toggle="dropdown" data-bs-auto-close="outside" aria-expanded="false">
    Clickable inside
  </button>
  <ul class="dropdown-menu">
    <li><a class="dropdown-item" href="#">Menu item</a></li>
    <li><a class="dropdown-item" href="#">Menu item</a></li>
    <li><a class="dropdown-item" href="#">Menu item</a></li>
  </ul>
</div>

<div class="btn-group">
  <button class="btn btn-secondary dropdown-toggle" type="button" data-bs-toggle="dropdown" data-bs-auto-close="false" aria-expanded="false">
    Manual close
  </button>
  <ul class="dropdown-menu">
    <li><a class="dropdown-item" href="#">Menu item</a></li>
    <li><a class="dropdown-item" href="#">Menu item</a></li>
    <li><a class="dropdown-item" href="#">Menu item</a></li>
  </ul>
</div>

ሲኤስኤስ

ተለዋዋጢ ረቛሒታት

ኣብ v5.2.0 ተወሰኸ

ከም ኣካል ናይቲ ዝምዕብል ዘሎ ናይ ቡትስትራፕ ተለዋዋጢ CSS ኣቀራርባ፡ ሕጂ ንቑልቁል ዝወርድ ንዝተዓበየ .dropdown-menuናይ ሓቂ ግዜ ምምዕርራይ ከባብያዊ CSS ተለዋዋጢ on ይጥቀሙ። ክብርታት ናይ CSS ተቐያየርቲ ብመንገዲ Sass ይቕመጡ፣ ስለዚ Sass ምምዕርራይ ጌና ይድገፍ እዩ፣ ንሱ እውን።

  --#{$prefix}dropdown-zindex: #{$zindex-dropdown};
  --#{$prefix}dropdown-min-width: #{$dropdown-min-width};
  --#{$prefix}dropdown-padding-x: #{$dropdown-padding-x};
  --#{$prefix}dropdown-padding-y: #{$dropdown-padding-y};
  --#{$prefix}dropdown-spacer: #{$dropdown-spacer};
  @include rfs($dropdown-font-size, --#{$prefix}dropdown-font-size);
  --#{$prefix}dropdown-color: #{$dropdown-color};
  --#{$prefix}dropdown-bg: #{$dropdown-bg};
  --#{$prefix}dropdown-border-color: #{$dropdown-border-color};
  --#{$prefix}dropdown-border-radius: #{$dropdown-border-radius};
  --#{$prefix}dropdown-border-width: #{$dropdown-border-width};
  --#{$prefix}dropdown-inner-border-radius: #{$dropdown-inner-border-radius};
  --#{$prefix}dropdown-divider-bg: #{$dropdown-divider-bg};
  --#{$prefix}dropdown-divider-margin-y: #{$dropdown-divider-margin-y};
  --#{$prefix}dropdown-box-shadow: #{$dropdown-box-shadow};
  --#{$prefix}dropdown-link-color: #{$dropdown-link-color};
  --#{$prefix}dropdown-link-hover-color: #{$dropdown-link-hover-color};
  --#{$prefix}dropdown-link-hover-bg: #{$dropdown-link-hover-bg};
  --#{$prefix}dropdown-link-active-color: #{$dropdown-link-active-color};
  --#{$prefix}dropdown-link-active-bg: #{$dropdown-link-active-bg};
  --#{$prefix}dropdown-link-disabled-color: #{$dropdown-link-disabled-color};
  --#{$prefix}dropdown-item-padding-x: #{$dropdown-item-padding-x};
  --#{$prefix}dropdown-item-padding-y: #{$dropdown-item-padding-y};
  --#{$prefix}dropdown-header-color: #{$dropdown-header-color};
  --#{$prefix}dropdown-header-padding-x: #{$dropdown-header-padding-x};
  --#{$prefix}dropdown-header-padding-y: #{$dropdown-header-padding-y};
  

ብCSS ተለዋዋጢ ረቛሒታት ኣቢልና ምምዕርራይ ኣብቲ ክፍሊ ክርአ ይከኣል .dropdown-menu-darkኣብኡ ፍሉያት ክብርታት ተደጋገምቲ CSS መምረጺታት ከይወሰኽና ንገፍፎም።

  --#{$prefix}dropdown-color: #{$dropdown-dark-color};
  --#{$prefix}dropdown-bg: #{$dropdown-dark-bg};
  --#{$prefix}dropdown-border-color: #{$dropdown-dark-border-color};
  --#{$prefix}dropdown-box-shadow: #{$dropdown-dark-box-shadow};
  --#{$prefix}dropdown-link-color: #{$dropdown-dark-link-color};
  --#{$prefix}dropdown-link-hover-color: #{$dropdown-dark-link-hover-color};
  --#{$prefix}dropdown-divider-bg: #{$dropdown-dark-divider-bg};
  --#{$prefix}dropdown-link-hover-bg: #{$dropdown-dark-link-hover-bg};
  --#{$prefix}dropdown-link-active-color: #{$dropdown-dark-link-active-color};
  --#{$prefix}dropdown-link-active-bg: #{$dropdown-dark-link-active-bg};
  --#{$prefix}dropdown-link-disabled-color: #{$dropdown-dark-link-disabled-color};
  --#{$prefix}dropdown-header-color: #{$dropdown-dark-header-color};
  

ሳስ ተለዋዋጢ ረቛሒታት

ንኹሎም ንቑልቁል ዝወርድ ተለዋዋጢ ረቛሒታት፤

$dropdown-min-width:                10rem;
$dropdown-padding-x:                0;
$dropdown-padding-y:                .5rem;
$dropdown-spacer:                   .125rem;
$dropdown-font-size:                $font-size-base;
$dropdown-color:                    $body-color;
$dropdown-bg:                       $white;
$dropdown-border-color:             var(--#{$prefix}border-color-translucent);
$dropdown-border-radius:            $border-radius;
$dropdown-border-width:             $border-width;
$dropdown-inner-border-radius:      subtract($dropdown-border-radius, $dropdown-border-width);
$dropdown-divider-bg:               $dropdown-border-color;
$dropdown-divider-margin-y:         $spacer * .5;
$dropdown-box-shadow:               $box-shadow;

$dropdown-link-color:               $gray-900;
$dropdown-link-hover-color:         shade-color($dropdown-link-color, 10%);
$dropdown-link-hover-bg:            $gray-200;

$dropdown-link-active-color:        $component-active-color;
$dropdown-link-active-bg:           $component-active-bg;

$dropdown-link-disabled-color:      $gray-500;

$dropdown-item-padding-y:           $spacer * .25;
$dropdown-item-padding-x:           $spacer;

$dropdown-header-color:             $gray-600;
$dropdown-header-padding-x:         $dropdown-item-padding-x;
$dropdown-header-padding-y:         $dropdown-padding-y;
// fusv-disable
$dropdown-header-padding:           $dropdown-header-padding-y $dropdown-header-padding-x; // Deprecated in v5.2.0
// fusv-enable

ተለዋዋጢ ንጸልማት ንቑልቁል ዝወርድ :

$dropdown-dark-color:               $gray-300;
$dropdown-dark-bg:                  $gray-800;
$dropdown-dark-border-color:        $dropdown-border-color;
$dropdown-dark-divider-bg:          $dropdown-divider-bg;
$dropdown-dark-box-shadow:          null;
$dropdown-dark-link-color:          $dropdown-dark-color;
$dropdown-dark-link-hover-color:    $white;
$dropdown-dark-link-hover-bg:       rgba($white, .15);
$dropdown-dark-link-active-color:   $dropdown-link-active-color;
$dropdown-dark-link-active-bg:      $dropdown-link-active-bg;
$dropdown-dark-link-disabled-color: $gray-500;
$dropdown-dark-header-color:        $gray-500;

ናይ ሓደ ንቑልቁል ዝወርድ መስተጋብር ዘመልክቱ ተለዋዋጢ ንCSS-based carets፤

$caret-width:                 .3em;
$caret-vertical-align:        $caret-width * .85;
$caret-spacing:               $caret-width * .85;

ሚክሲን ዝበሃሉ ምዃኖም ይፍለጥ

ሚክሲን ነቶም ኣብ CSS ዝተመርኮሱ ካረታት ንምፍጣር ዝጥቀሙ ኮይኖም ኣብ scss/mixins/_caret.scss.

@mixin caret-down {
  border-top: $caret-width solid;
  border-right: $caret-width solid transparent;
  border-bottom: 0;
  border-left: $caret-width solid transparent;
}

@mixin caret-up {
  border-top: 0;
  border-right: $caret-width solid transparent;
  border-bottom: $caret-width solid;
  border-left: $caret-width solid transparent;
}

@mixin caret-end {
  border-top: $caret-width solid transparent;
  border-right: 0;
  border-bottom: $caret-width solid transparent;
  border-left: $caret-width solid;
}

@mixin caret-start {
  border-top: $caret-width solid transparent;
  border-right: $caret-width solid;
  border-bottom: $caret-width solid transparent;
}

@mixin caret($direction: down) {
  @if $enable-caret {
    &::after {
      display: inline-block;
      margin-left: $caret-spacing;
      vertical-align: $caret-vertical-align;
      content: "";
      @if $direction == down {
        @include caret-down();
      } @else if $direction == up {
        @include caret-up();
      } @else if $direction == end {
        @include caret-end();
      }
    }

    @if $direction == start {
      &::after {
        display: none;
      }

      &::before {
        display: inline-block;
        margin-right: $caret-spacing;
        vertical-align: $caret-vertical-align;
        content: "";
        @include caret-start();
      }
    }

    &:empty::after {
      margin-left: 0;
    }
  }
}

ኣጠቓቕማ

.showብመንገዲ ባህርያት ዳታ ወይ ጃቫስክሪፕት፡ እቲ ንቑልቁል ዝወርድ ተወሰኽቲ ነቲ ክፍሊ ኣብቲ ወላዲ ብምቕያር ንዝተሓብአ ትሕዝቶ (ንቑልቁል ዝወርድ ዝርዝር) ይቕይሮ .dropdown-menu። እቲ data-bs-toggle="dropdown"ባህሪ ብደረጃ መተግበሪ ንዝርከቡ ንቑልቁል ዝወርድ ምልክታታት ንምዕጻው ዝጽጋዕ እዩ፣ ስለዚ ኩሉ ግዜ ክትጥቀመሉ ጽቡቕ ሓሳብ እዩ።

ኣብ ምትንኻፍ ዝኽእል መሳርሒታት፡ ንቑልቁል ዝወርድ ምኽፋት ባዶ mouseoverመትሓዚታት ናብቶም ናይ ቀረባ ቆልዑ ናይቲ <body>ባእታ ይውስኽ። This admittedly ugly hack is necessary to work around a quirk in iOS' event delegation , እዚ እንተዘይኮይኑ ካብቲ ንቑልቁል ዝወርድ ወጻኢ ኣብ ዝኾነ ቦታ ምጥዋይ ነቲ ንቑልቁል ዝወርድ ኮድ ካብ ምብጋስ ክኽልክል ምኸኣለ። እቲ ንቑልቁል ዝወርድ ምስ ተዓጽወ፡ እዞም ተወሳኺ ባዶ mouseoverዝኾኑ መትሓዚታት ይእለዩ።

ብመንገዲ ባህርያት ዳታ

data-bs-toggle="dropdown"ንሓደ ንቑልቁል ዝወርድ ንቑልቁል ንምቕያር ናብ ሓደ ሊንክ ወይ መጠወቒ ወስኹ ።

<div class="dropdown">
  <button type="button" data-bs-toggle="dropdown" aria-expanded="false">
    Dropdown trigger
  </button>
  <ul class="dropdown-menu">
    ...
  </ul>
</div>

ብመንገዲ ጃቫስክሪፕት።

ብመንገዲ ጃቫስክሪፕት ናብቶም ንቑልቁል ዝወርድ ደውሉ፤

const dropdownElementList = document.querySelectorAll('.dropdown-toggle')
const dropdownList = [...dropdownElementList].map(dropdownToggleEl => new bootstrap.Dropdown(dropdownToggleEl))
data-bs-toggle="dropdown"ሕጂ’ውን የድሊ ኣሎ።

ንቑልቁል ዝወርድካ ብመንገዲ ጃቫስክሪፕት ትድውለሉ ወይ ኣብ ክንድኡ ነቲ data-api ትጥቀም ብዘየገድስ data-bs-toggle="dropdown"፡ ኩሉ ግዜ ኣብቲ ንቑልቁል ዝወርድ መበገሲ ባእታ ህልው ክህሉ ይግደድ።

ኣማራጺታት

ኣማራጺታት ብባህርያት ዳታ ወይ ጃቫስክሪፕት ክሓልፉ ስለ ዝኽእሉ data-bs-፡ ከምቲ ኣብ data-bs-animation="{value}". ነቶም ኣማራጺታት ብመንገዲ ባህርያት ዳታ ክትሓልፍ ከለኻ ፡ ዓይነት ኬዝ ናይቲ ስም ኣማራጺ ካብ “ camelCase ” ናብ “ kebab -case ” ምቕያርካ ኣረጋግጽ። ንኣብነት data-bs-custom-class="beautifier"ኣብ ክንዲ data-bs-customClass="beautifier".

ካብ Bootstrap 5.2.0 ጀሚሩ ኩሎም ኣካላት ንሓደ ፈተነ ዝተሓዝአ ዳታ ባህሪ ይድግፉ እዚ data-bs-configድማ ቀሊል ውቅር ኣካላት ከም JSON ሕብረ ቃላት ከዕቁብ ይኽእል። ሓደ ባእታ data-bs-config='{"delay":0, "title":123}'and data-bs-title="456"attributes ምስ ዝህልዎ፡ እቲ ናይ መወዳእታ titleዋጋ ክኸውን እዩ 456፡ እቶም ዝተፈላለዩ ዳታ ባህርያት ድማ ኣብ data-bs-config. ብተወሳኺ፡ ዝጸንሑ ባህርያት ዳታ ከም data-bs-delay='{"show":0,"hide":150}'.

ሽም ዓይነት ትሑዝ መግለፂ
autoClose boolean, ሕብረ ቃላት true ናይቲ ንቑልቁል ዝወርድ ኣውቶማቲክ ምዕጻው ባህሪ ውቅር፤
  • true- እቲ ንቑልቁል ዝወርድ ዝርዝር ኣብ ደገ ወይ ኣብ ውሽጢ ብምጥዋቕ ክዕጾ እዩ።
  • false- እቲ ንቑልቁል ዝወርድ ነቲ toggle ዝብል ቁልፊ ብምጥዋቕን ብኢድካ hideወይ toggleሜላ ብምድዋልን ክዕጾ እዩ። (ከምኡ ውን key ብምጽቃጥ escኣይዕጾን እዩ)
  • 'inside'- እቲ ንቑልቁል ዝወርድ ኣብ ውሽጢ እቲ ንቑልቁል ዝወርድ ዝርዝር ብምጥዋቕ ክዕጾ እዩ (ጥራይ)።
  • 'outside'- እቲ ንቑልቁል ዝወርድ ካብቲ ንቑልቁል ዝወርድ ዝርዝር ወጻኢ ብምጥዋቕ ክዕጾ እዩ (ጥራይ)።
መተሓሳሰቢ፡ እቲ ንቑልቁል ዝወርድ ኩሉ ግዜ ESCብመፍትሕ ክዕጾ ይኽእል።
boundary ሕብረ ቃላት፣ ባእታ 'clippingParents' ናይ ምፍሳስ ደረት ዶብ ናይቲ ንቑልቁል ዝወርድ ዝርዝር (ንናይ ፖፐር preventOverflow መቐየሪ ጥራይ እዩ ዝምልከት)። ብነባሪ clippingParentsHTMLElement መወከሲ እዩ (ብጃቫስክሪፕት ጥራይ ኣቢሉ) ክቕበል ይኽእልን ይኽእል። ንዝያዳ ሓበሬታ ኣብ Popper's detectOverflow docs ተወከሱ ።
display ገመድ 'dynamic' ብነባሪ ንዳይናሚክ ኣቀማምጣ ፖፐር ንጥቀም። ነዚ ብ static.
offset ስርርዕ፣ ሕብረ ቃላት፣ ተግባር [0, 2] ምትዕርራይ ናይቲ ምውራድ ብተዛማዲ ምስቲ ዕላማኡ። ኣብ ዳታ ባህርያት ብኮማ ዝተፈላለዩ ክብርታት ከም: data-bs-offset="10,20". ሓደ ፋንክሽን ነቲ ኦፍሴት ንምውሳን ክጥቀመሉ ከሎ፡ ከም ቀዳማይ ሞጎቱ፡ ፖፐር ኣቀማምጣ፡ መወከሲ፡ ፖፐር ሬክትስን ዝሓዘ ነገር ሒዙ ይጽዋዕ። እቲ መበገሲ ባእታ DOM node ከም ካልኣይ ሞጎተ ይሓልፍ። እቲ ፋንክሽን ክልተ ቁጽርታት ዘለዎ ስርዓት ክመልስ ኣለዎ: skidding , distance . ንዝያዳ ሓበሬታ ኣብ ፖፐር ኦፍሴት ዶክስ ተወከሱ ።
popperConfig ባዶ፣ ነገር፣ ተግባር null ናይ ቡትስትራፕ ነባሪ ናይ ፖፐር ውቅር ንምቕያር፡ ናይ ፖፐር ውቅር ርአ ። ሓደ ፋንክሽን ንናይ ፖፐር ውቅር ንምፍጣር ክጥቀመሉ ከሎ፡ ብናይ ቡትስትራፕ ነባሪ ፖፐር ውቅር ዝሓዘ ነገር ይጽዋዕ። ነቲ ነባሪ ምስ ናይ ገዛእ ርእስኻ ውቅር ክትጥቀመሉን ክትወሃሃዶን ይሕግዘካ። እቲ ተግባር ንፖፐር ናይ ውቅር ነገር ክመልስ ኣለዎ።
reference ሕብረ ቃላት፡ ባእታ፡ ነገር 'toggle' መወከሲ ባእታ ናይቲ ንቑልቁል ዝወርድ ዝርዝር። 'toggle'ናይ , 'parent', ናይ HTMLElement መወከሲ ወይ ናይ ሓደ ነገር ዝህብ ክብርታት ይቕበል getBoundingClientRect። ንዝያዳ ሓበሬታ ንናይ ፖፐር ሃናጺ ዶክስን ቨርቹዋል ባእታ ዶክስን ተወከሱ ።

ፋንክሽን ምስ ምጥቃምpopperConfig

const dropdown = new bootstrap.Dropdown(element, {
  popperConfig(defaultBsPopperConfig) {
    // const newPopperConfig = {...}
    // use defaultBsPopperConfig if needed...
    // return newPopperConfig
  }
})

ኣገባባት

ሜላ መግለፂ
dispose ናይ ሓደ ባእታ ንቑልቁል ዝወርድ የጥፍኦ። (ኣብ DOM element ዝተዓቀበ ዳታ የወግድ)
getInstance ምስ ሓደ DOM element ዝተኣሳሰር ንቑልቁል ዝወርድ ምሳሌ ክትረክብ ዘኽእለካ ስታቲክ ሜላ፣ ከምዚ ጌርካ ክትጥቀመሉ ትኽእል ኢኻ bootstrap.Dropdown.getInstance(element)
getOrCreateInstance ምስ ሓደ DOM ባእታ ዝተኣሳሰር ንቑልቁል ዝወርድ ምሳሌ ዝምለስ ወይ ድማ ንኸይተጀመረ ሓድሽ ዝፈጥር ስታትቲክ ሜላ። ከምዚ ጌርካ ክትጥቀመሉ ትኽእል ኢኻ bootstrap.Dropdown.getOrCreateInstance(element)፡ .
hide ናይ ሓደ ዝተዋህበ ናቭባር ወይ ትቦ ዘለዎ ምድህሳስ ንቑልቁል ዝወርድ ዝርዝር ይሓብእ።
show ናይ ሓደ ዝተዋህበ ናቭባር ወይ ትቦ ዘለዎ ምድህሳስ ንቑልቁል ዝወርድ ዝርዝር የርኢ።
toggle ናይ ሓደ ዝተዋህበ ናቭባር ወይ ትቦ ዘለዎ ምድህሳስ ንቑልቁል ዝወርድ ዝርዝር ይቕይሮ።
update ናይ ሓደ ባእታ ንቑልቁል ዝወርድ ቦታ ኣቀማምጣ የዘምን።

ፍጻሜታት

ኩሎም ንቑልቁል ዝወርድ ፍጻመታት ኣብቲ ዝቕይር ባእታ ይትኮሱ ድሕሪኡ ድማ ይፍንፍሑ። .dropdown-menuስለዚ ኣብቲ 's ወላዲ ባእታ ውን ናይ ፍጻመ ሰማዕቲ ክትውስኽ ትኽእል ኢኻ ። hide.bs.dropdownከምኡ’ውን hidden.bs.dropdownፍጻመታት ንፍጻመ ጠውቂ ዝኸውን Event Object ዝሓዘ clickEventንብረት ኣለዎም (እቲ መበቆላዊ ዓይነት Event ምስ ዝኸውን ጥራይ )።click

ዓይነት ፍጻመ መግለፂ
hide.bs.dropdown hideእቲ ናይ ምሳሌ ሜላ ምስ ተጸውዐ ብቕጽበት ይትኩስ ።
hidden.bs.dropdown እቲ ንቑልቁል ዝወርድ ካብ ተጠቃሚ ምሕባእ ምስተወድአን ምስግጋር CSS ምስተዛዘመን ይተኮስ።
show.bs.dropdown showእቲ ናይ ምሳሌ ሜላ ምስ ዝጽዋዕ ብቕጽበት ይትኩስ ።
shown.bs.dropdown እቲ ንቑልቁል ዝወርድ ንተጠቃሚ ርኡይ ምስ ዝኸውንን ምስግጋር CSS ምስተዛዘመን ይተኮስ።
const myDropdown = document.getElementById('myDropdown')
myDropdown.addEventListener('show.bs.dropdown', event => {
  // do something...
})