x
1
2
3
4
5
6
7
8
9
<div class="p-4 text-sm bg-brand-softer text-fg-brand-strong border border-brand-subtle rounded-base" role="alert">
<div class="flex items-center">
<svg aria-hidden="true" class="w-4 h-4 shrink-0 me-2" fill="none" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M10 11h2v5m-2 0h4m-2.592-8.5h.01M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" /></svg>
<span class="sr-only">Info</span>
<h3 class="font-medium">This is an info alert</h3>
</div>
<div class="mt-2 mb-4">More info about this info alert goes here. This example text is going to run a bit longer so that you can see how spacing within an alert works with this kind of content.</div>
<button class="focus:outline-none text-white bg-brand box-border border border-transparent hover:bg-brand-strong focus:ring-4 focus:ring-brand-medium shadow-xs font-medium leading-5 rounded-base text-xs px-3 py-1.5">View more</button>
</div>
1
2
3
4
5
6
render(Flowbite::Alert.new(bordered: true, title: "This is an info alert")) do |alert|
alert.with_additional_content do
render_to_string(Flowbite::Button.new(size: :xs).with_content("View more"))
end
"More info about this info alert goes here. This example text is going to run a bit longer so that you can see how spacing within an alert works with this kind of content."
end