Skip to content
HyperUI for Flutter requires the Style package — this site itself ships no pub package.

Dividers

Ported from HyperUI’s Dividers — see Attribution.

Includes a dark: variant — toggle the site theme (top right) to preview it.

class Dividers1Example extends StatelessWidget {
const Dividers1Example({super.key});
@override
Widget build(BuildContext context) {
return Style(
'mx-auto max-w-3xl p-6',
child: Style(
'flex items-center',
children: const [
Style('h-px flex-1 bg-gray-300 dark:bg-gray-600'),
Style(
'shrink-0 px-4 text-gray-900 dark:text-white',
child: Text('Title goes here'),
),
Style('h-px flex-1 bg-gray-300 dark:bg-gray-600'),
],
),
);
}
}

Includes a dark: variant — toggle the site theme (top right) to preview it.

class Dividers2Example extends StatelessWidget {
const Dividers2Example({super.key});
@override
Widget build(BuildContext context) {
return Style(
'mx-auto max-w-3xl p-6',
child: Style(
'flex items-center',
children: const [
Style(
'h-px flex-1 bg-linear-to-r from-transparent to-gray-300 dark:to-gray-600',
),
Style(
'shrink-0 px-4 text-gray-900 dark:text-white',
child: Text('Title goes here'),
),
Style(
'h-px flex-1 bg-linear-to-l from-transparent to-gray-300 dark:to-gray-600',
),
],
),
);
}
}

Includes a dark: variant — toggle the site theme (top right) to preview it.

class Dividers3Example extends StatelessWidget {
const Dividers3Example({super.key});
@override
Widget build(BuildContext context) {
return Style(
'mx-auto max-w-3xl p-6',
child: Style(
'flex items-center',
children: const [
Style(
'shrink-0 pe-4 text-gray-900 dark:text-white',
child: Text('Title goes here'),
),
Style('h-px flex-1 bg-gray-300 dark:bg-gray-600'),
],
),
);
}
}

Includes a dark: variant — toggle the site theme (top right) to preview it.

class Dividers4Example extends StatelessWidget {
const Dividers4Example({super.key});
@override
Widget build(BuildContext context) {
return Style(
'mx-auto max-w-3xl p-6',
child: Style(
'flex items-center',
children: const [
Style(
'shrink-0 pe-4 text-gray-900 dark:text-white',
child: Text('Title goes here'),
),
Style(
'h-px flex-1 bg-linear-to-l from-transparent to-gray-300 dark:to-gray-600',
),
],
),
);
}
}

Includes a dark: variant — toggle the site theme (top right) to preview it.

class Dividers5Example extends StatelessWidget {
const Dividers5Example({super.key});
@override
Widget build(BuildContext context) {
return Style(
'mx-auto max-w-3xl p-6',
child: Style(
'flex items-center',
children: const [
Style('h-px flex-1 bg-gray-300 dark:bg-gray-600'),
Style(
'shrink-0 ps-4 text-gray-900 dark:text-white',
child: Text('Title goes here'),
),
],
),
);
}
}

Includes a dark: variant — toggle the site theme (top right) to preview it.

class Dividers6Example extends StatelessWidget {
const Dividers6Example({super.key});
@override
Widget build(BuildContext context) {
return Style(
'mx-auto max-w-3xl p-6',
child: Style(
'flex items-center',
children: const [
Style(
'h-px flex-1 bg-linear-to-r from-transparent to-gray-300 dark:to-gray-600',
),
Style(
'shrink-0 ps-4 text-gray-900 dark:text-white',
child: Text('Title goes here'),
),
],
),
);
}
}