AstrolUI AstrolUI
Amarillo Naranja Rojo Verde Azul Morado Color propio
Modo claro
Box

1. Demo AstrolBox

Base
White
Black
Blue
Green
Orange
Red
Yellow
Purple
Base
White
Black
Blue
Green
Orange
Red
Yellow
Purple

Hello World!

@using Astrol.Entities.Basic.UI
@using Astrol.Component.Basic.Box
<AstrolBox Style="AstrolStyle.Base">Base</AstrolBox>
<AstrolBox Style="AstrolStyle.White">White</AstrolBox>
<AstrolBox Style="AstrolStyle.Black">Black</AstrolBox>
<AstrolBox Style="AstrolStyle.Blue">Blue</AstrolBox>
<AstrolBox Style="AstrolStyle.Green">Green</AstrolBox>
<AstrolBox Style="AstrolStyle.Orange">Orange</AstrolBox>
<AstrolBox Style="AstrolStyle.Red">Red</AstrolBox>
<AstrolBox Style="AstrolStyle.Yellow">Yellow</AstrolBox>
<AstrolBox Style="AstrolStyle.Purple">Purple</AstrolBox>
<!-- Outline -->
<AstrolBox Style="AstrolStyle.Base" Outline="true">Base</AstrolBox>
<AstrolBox Style="AstrolStyle.White" Outline="true">White</AstrolBox>
<AstrolBox Style="AstrolStyle.Black" Outline="true">Black</AstrolBox>
<AstrolBox Style="AstrolStyle.Blue" Outline="true">Blue</AstrolBox>
<AstrolBox Style="AstrolStyle.Green" Outline="true">Green</AstrolBox>
<AstrolBox Style="AstrolStyle.Orange" Outline="true">Orange</AstrolBox>
<AstrolBox Style="AstrolStyle.Red" Outline="true">Red</AstrolBox>
<AstrolBox Style="AstrolStyle.Yellow" Outline="true">Yellow</AstrolBox>
<AstrolBox Style="AstrolStyle.Purple" Outline="true">Purple</AstrolBox>
<!-- Custom content -->
<AstrolBox Style="AstrolStyle.Green" Outline="true">
   <h1>
       <Astrol.Component.Basic.Icon.AstrolIcon Icon="astrol-emo-sunglasses" />
       Hello World!
   </h1>
</AstrolBox>

Parámetros que admite

  • ChildContent (RenderFragment?), contenido HTML de la caja.
  • Style (AstrolStyle), color de la caja (por defecto es AstrolStyle.Base).
    • Base (enum)
    • White (enum)
    • Black (enum)
    • Red (enum)
    • Orange (enum)
    • Green (enum)
    • Blue (enum)
    • Yellow (enum)
    • Purple (enum)
  • Outline (bool), muestra la caja sin relleno, solo con el borde y el texto del color elegido (por defecto es false).
  • BorderRadius (string), radio del borde de la caja (por defecto, el del tema: 6px).
  • Class (string?), clase css adicional (no requerido).
  • AdditionalClasses (IEnumerable<string>?), clases css adicionales que se añaden junto a Class (no requerido).
  • OnClick (EventCallback<MouseEventArgs>), acción al hacer clic en la caja (no requerido). La caja es un div: no recibe el foco ni se activa con el teclado; para acciones use AstrolButton.
Markdown para IA © 2026 AstrolUI v10.0.13