Live preview

Interactive example

Loading example…

Usage

Import the component, then make it your own.

ComponentInfoBox

svelte

<script>
  // Import the shared stylesheet once in your application's root layout.
  import "sveltekit-ui/style.css"
  import { InfoBox } from "sveltekit-ui"
</script>

<InfoBox message="Your draft is saved locally." is_cancelable={true} />

API reference

Props accepted by the component.

10 entries in properties

PropertyTypeDefaultDescription
hnumber 10-25 hue
messagestring nullMessage
link_namestring nulllink name displayed at end of note
linkstring nulllink to direct to
is_cancelableboolean trueAdds an × to make the note disappear
brnumber 0Border radius in rem
mlnumber 0margin-left in rem
mrnumber 0margin-right in rem
mtnumber 0margin-top in rem
mbnumber 0margin-bottom in rem