View Source TwScreenSize (tw_screen_size v1.0.0)

Documentation for TwScreenSize. A tiny LiveView widget showing the current screen dimensions and Tailwind breakpoint.

Summary

Functions

Attributes

  • base_class (:string) - Override the default styling with a custom class. This is appended to the always required classes: hidden fixed opacity-0 transition-opacity z-[999]. Defaults to "items-center space-x-2 rounded-full bg-black px-2.5 py-1 font-mono text-xs font-medium text-white".
  • placement_class (:string) - Classes to determine where the screen size component is placed on the screen. Defaults to bottom-5 left-5. Defaults to "bottom-5 left-5".
  • transition_duration_class (:string) - The Tailwind transition duration class. Defaults to duration-300. Defaults to "duration-300".
  • opacity_timeout (:integer) - Make the component 100% transparent after this timeout in milliseconds. Becomes visible on initial page load and during resizes. Disabled by default.

Functions

Attributes

  • base_class (:string) - Override the default styling with a custom class. This is appended to the always required classes: hidden fixed opacity-0 transition-opacity z-[999]. Defaults to "items-center space-x-2 rounded-full bg-black px-2.5 py-1 font-mono text-xs font-medium text-white".
  • placement_class (:string) - Classes to determine where the screen size component is placed on the screen. Defaults to bottom-5 left-5. Defaults to "bottom-5 left-5".
  • transition_duration_class (:string) - The Tailwind transition duration class. Defaults to duration-300. Defaults to "duration-300".
  • opacity_timeout (:integer) - Make the component 100% transparent after this timeout in milliseconds. Becomes visible on initial page load and during resizes. Disabled by default.